vue-admin-element項目突然就起不來了的解決
vue-admin-element項目突然就起不來
INFO Starting development server...
ERROR WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.name should be a string.
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.name should be a string.
-> Name of the configuration. Used when loading multiple configurations.
at webpack (E:\qdyh\trunk\qdyh-web\node_modules\webpack\lib\webpack.js:31:9)
at serve (E:\qdyh\trunk\qdyh-web\node_modules\@vue\cli-service\lib\commands\serve.js:135:22)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-admin-template@4.2.1 dev: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-admin-template@4.2.1 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hyx\AppData\Roaming\npm-cache\_logs\2020-04-28T08_05_55_780Z-debug.log
PS E:\qdyh\trunk\qdyh-web> npm i
npm WARN vue-admin-template@4.2.1 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
如果你的項目什么也沒有改動,啟動時突然報以上錯誤,那有可能是環(huán)境出現(xiàn)了某些問題,這時候可以刪除node_modules,重新裝,這時解決npm WARN vue-admin-template@4.2.1 No repository field.這個警告
解決方案如下
npm WARN XXXXXXXX No repository field.問題
這是因為刪除node_modules文件,導(dǎo)致之前與代碼倉庫的聯(lián)系消失,有兩種解決方案
一、將項目設(shè)置為私有
在package.json中添加
"private": true
二、將項目的倉庫地址添上即可
"repository": {
"type": "git",
"url": "http://baidu.com"
}以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
Vue.config.productionTip?=?false?不起作用的問題及解決
這篇文章主要介紹了Vue.config.productionTip?=?false為什么不起作用,本文給大家分析問題原因解析及解決方案,需要的朋友可以參考下2022-11-11
Vue 解決通過this.$refs來獲取DOM或者組件報錯問題
這篇文章主要介紹了Vue 解決通過this.$refs來獲取DOM或者組件報錯問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-07-07
Vue3?vite配置css?的sourceMap及文件引用配置別名的過程
這篇文章主要介紹了Vue3 vite配置css的sourceMap,及文件引用配置別名的過程,本文結(jié)合實例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2023-07-07
vue3+vite自定義封裝vue組件發(fā)布到npm包的全過程
當(dāng)市面上主流的組件庫不能滿足我們業(yè)務(wù)需求的時候,那么我們就有必要開發(fā)一套屬于自己團(tuán)隊的組件庫,下面這篇文章主要給大家介紹了關(guān)于vue3+vite自定義封裝vue組件發(fā)布到npm包的相關(guān)資料,需要的朋友可以參考下2022-09-09

