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 項目就啟動起來