遇到的一个小问题记录下,下载了V部落想在本地查看下前端页面的效果,于是进入vue项目下npm run dev,结果报了下面的错误
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-manage-system@3.2.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-manage-system@3.2.0 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\admin\AppData\Roaming\npm-cache\_logs\2018-11-09T07_28_28_466Z-debug.log
查看了stackoverflow上的回答
https://stackoverflow.com/questions/42308879/npm-err-code-elifecycle
- npm cache clean --force
- delete node_modules folder
- delete package-lock.json file
- npm install
发现要执行npm install自己是洗新手压根就没执行啊,于是到项目目录下去执行npm install,结果执行不成功,查看node.js版本才8.x,于是卸载了重装升级到了最新版本,再执行npm install成功执行
执行 npm run dev 成功执行,本地打开localhost:8080可以查看到页面
吐槽:下载源设置为淘宝以后,下载过程生成node_modules这个文件夹也还是等了很久,node_modules这个文件夹一百多兆,太大了
网友评论