npm报错 This is probably not a problem with npm,there is likely additional logging output above可能的原因

1

npm WARN Local package.json exists, but node_modules missing, did you mean to install?


解决方法:

输入npm install 或 cnpm install 后,再次启动

npm run dev 成功启动!

2

10% building 8/9 modules 1 active …web.0.9.2\node_modules\lodash\lodash.jsevents.js:183

Error: getaddrinfo ENOTFOUND dev.maxim.top at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)

解决办法:Error: getaddrinfo ENOTFOUND dev.maxim.top at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)

错误提示,应该是无法去访问dev.maxim.top,然后去全局搜索dev.maxim.top,发现在webpack.dev.config.js文件中有,由于这

个dev.maxim.top无法访问而导致的,我们只需将dev.maxim.top改成localhost,重新 npm run dev 就可以成功启动了。

3

npm 报错This is probably not a problem with npm. There is likely additional logging output above.

1

可能是版本的问题

重新 npm install

然后 npm i -D webpack-dev-server@3.0.0

再 npm run dev

重新安装一次,如果还是不可以的话,在把之前装的都清空

rm -rf node_modules

rm package-lock.json

npm cache clear --force

npm install

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容