vue-admin-element项目突然就起不来了的解决
作者:makelucky 时间:2023-07-02 16:37:58
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"})
如果你的项目什么也没有改动,启动时突然报以上错误,那有可能是环境出现了某些问题,这时候可以删除node_modules,重新装,这时解决npm WARN vue-admin-template@4.2.1 No repository field.这个警告
解决方案如下
npm WARN XXXXXXXX No repository field.问题
这是因为删除node_modules文件,导致之前与代码仓库的联系消失,有两种解决方案
一、将项目设置为私有
在package.json中添加
"private": true
二、将项目的仓库地址添上即可
"repository": {
"type": "git",
"url": "http://baidu.com"
}
来源:https://blog.csdn.net/makelucky/article/details/105816512
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
php ajax异步读取rss文档数据
python实时分析日志的一个小脚本分享
oracle11g卸载完整图文教程
![](https://img.aspxhome.com/file/2023/4/65254_0s.png)
网页绿色系配色应用实例
![](https://img.aspxhome.com/file/UploadPic/20088/26/2008826115322660s.gif)
python之PyMongo使用总结
selenium3.0+python之环境搭建的方法步骤
![](https://img.aspxhome.com/file/2023/7/96977_0s.png)
Python嵌套循环的使用
![](https://img.aspxhome.com/file/2023/5/101095_0s.png)
python基础之Socket套接字详解
![](https://img.aspxhome.com/file/2023/7/117627_0s.png)
Web设计中的黄金分割[译]
![](https://img.aspxhome.com/file/UploadPic/20092/20/01-25s.jpg)
MySQL数据库之索引详解
![](https://img.aspxhome.com/file/2023/8/108908_0s.jpg)
浅谈MySQL 亿级数据分页的优化
![](https://img.aspxhome.com/file/2023/7/129927_0s.png)
六行python代码的爱心曲线详解
![](https://img.aspxhome.com/file/2023/3/114663_0s.png)
Django中URL的参数传递的实现
探析Windows下将gvim8配置为Python IDE的方法
![](https://img.aspxhome.com/file/2023/4/134684_0s.png)
从p开始,循序渐进学习WEB标准
python实现傅里叶级数展开的实现
![](https://img.aspxhome.com/file/2023/1/117971_0s.png)
MySQL批量插入数据脚本
[翻译]标记语言和样式手册 Chapter 7 锚点
![](https://img.aspxhome.com/file/UploadPic/20081/28/2008128141614907s.jpg)
Python(Tornado)模拟登录小米抢手机
![](https://img.aspxhome.com/file/2023/5/126995_0s.jpg)