[npm run dev ERR!] error code ELIFECYCLE || There is likely additional logging output above.

版权声明:版权属 ©胖子ღ牛逼,微信:xuewen-weiboweixin https://blog.csdn.net/z_xuewen/article/details/82964208

npm run dev 踩坑!!国庆节前还好好的,一个假期回来上班发现运行不了了。。报了以下错误error:

又翻开日志查看下具体的错误,主要如下几行:

...

20 error code ELIFECYCLE

21 error errno 1

22 error [email protected] dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`

22 error Exit status 1

23 error Failed at the [email protected] dev script.

23 error This is probably not a problem with npm. There is likely additional logging output above.

24 verbose exit [ 1, true ]

重启过电脑,百度疯狂的查询,没有一个实用的答案,百度的答案千万个 还有人说是 node_modules 的权限问题 ,权限问题的那篇文章就有位沙发说“你一定是来搞笑的”。。[捂脸]

还有另一种答案是:

rm -rf node_modules

rm package-lock.json

npm cache clear --force

npm install

我也试了 没有作用,依然报错。

然后突然灵机一动 把 index.js 的 host 改回为 localhost ,居然运行成功

在cmd 运行 ipconfig 才发现 我电脑的内网ip有变动,本来是192.168.5.55 现在是 192.168.5.56 所以是由于host引起运行报错 [捂脸]

...  狠狠的打了自己一巴掌 ...

猜你喜欢

转载自blog.csdn.net/z_xuewen/article/details/82964208