npm run dev 运行报如下错误

ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iview-admin@2.0.0 build: vue-cli-service build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iview-admin@2.0.0 build 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:
报错信息

解决方案

1.如以前可执行某次执行突发报错那么不用怀疑,你的修改的文件报错,可能是格式问题仔细检查语法格式和各种括号

2.如不是文件报错引起npm执行如下命令:

npm uninstall webpack-dev-server
 
npm install webpack-dev-server@2.9.1
 
npm run dev

运行成功

在这里插入图片描述

Logo

前往低代码交流专区

更多推荐