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\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 就可以成功啟動了。

 

 

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM