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文件,導致之前與代碼倉庫的聯(lián)系消失,有兩種解決方案
一、將項目設(shè)置為私有
在package.json中添加
"private": true
二、將項目的倉庫地址添上即可
"repository": { "type": "git", "url": "http://baidu.com" }
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
一鍵將Word文檔轉(zhuǎn)成Vue組件mammoth的應用詳解
這篇文章主要為大家介紹了一鍵將Word文檔轉(zhuǎn)成Vue組件mammoth的應用詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2023-02-02Hexo已經(jīng)看膩了,來手把手教你使用VuePress搭建個人博客
vuepress是尤大大4月12日發(fā)布的一個全新的基于vue的靜態(tài)網(wǎng)站生成器,實際上就是一個vue的spa應用,內(nèi)置webpack,可以用來寫文檔。這篇文章給大家介紹了VuePress搭建個人博客的過程,感興趣的朋友一起看看吧2018-04-04在Vue3中使用BabylonJs開發(fā)?3D的初體驗
這篇文章主要介紹了在?Vue3?中使用?BabylonJs?開發(fā)?3D?是什么體驗,在本文中,向您展示了如何創(chuàng)建?Vue?組件、Babylon?類、在畫布上渲染場景以及創(chuàng)建?3D?網(wǎng)格,需要的朋友可以參考下2022-07-07