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

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 ode_moduleslodashlodash.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 就可以成功启动了。

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

可能是版本的问题

重新 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

  • 然后对项目进行npm install,在项目中会生成一个文件夹如下:

此时再执行npm start 项目就启动起来

————————————————
版权声明:本文为CSDN博主「flym_」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u014689760/article/details/90290322

原文地址:https://www.cnblogs.com/muxi0407/p/11833317.html