npm:no such file /usr/local/lib/node_modules/vue-cli/node_modules/get-stream
阿新 • • 發佈:2018-11-21
Mac 使用安裝vue-cli腳手架的時候報錯
npm ERR! path /usr/local/lib/node_modules/vue-cli/node_modules/get-stream
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/usr/local/lib/node_modules/vue-cli/node_modules/get-stream'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoentnpm ERR! A complete log of this run can be found in:
npm ERR! /Users/gaocuili/.npm/_logs/2018-11-21T03_05_31_520Z-debug.log
解決方案:
1、切換到/usr/local/lib/node_modules/目錄
cd /usr/local/lib/node_modules/
2、刪除vue-cli資料夾
open /usr/local/lib/node_modules/
然後刪除
3、重新安裝vue-cli
vue-cli $ npm install --global vue-cli