npm run dev 報錯:

問題:npm run dev 報錯如下  (參考:https://stackoverflow.com/questions/42308879/npm-err-code-elifecycle

sh: egg-bin: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dev: `egg-bin dev`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wykay/.npm/_logs/2018-07-03T07_18_06_762Z-debug.log

 

解決:

Step 1: npm cache clean --force

Step 2: delete node_modules folder

Step 3: npm install

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章