vue-cli安裝失敗解決方案
阿新 • • 發佈:2020-07-06
C:\WINDOWS\system32>npm install vue-cli -g npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated duplexer3@0.1.4: Sadly, duplexer3 isno longer with us. It will be missed. npm WARN rm not removing C:\Program Files\nodejs\vue.ps1 as it wasn't installed by C:\Program Files\nodejs\node_modules\vue-cli npm WARN rm not removing C:\Program Files\nodejs\vue.cmd as it wasn't installed by C:\Program Files\nodejs\node_modules\vue-cli npm WARN rm not removing C:\Program Files\nodejs\vue asit wasn't installed by C:\Program Files\nodejs\node_modules\vue-cli C:\Program Files\nodejs\vue-init -> C:\Program Files\nodejs\node_modules\vue-cli\bin\vue-init C:\Program Files\nodejs\vue-list -> C:\Program Files\nodejs\node_modules\vue-cli\bin\vue-list npm ERR! code EEXIST npm ERR! path C:\Program Files\nodejs\node_modules\vue-cli\bin\vue npm ERR! dest C:\Program Files\nodejs\vue.cmd npm ERR! EEXIST: file already exists, cmd shim 'C:\Program Files\nodejs\node_modules\vue-cli\bin\vue' -> 'C:\Program Files\nodejs\vue.cmd' npm ERR! File exists: C:\Program Files\nodejs\vue.cmd npm ERR! Remove the existing file and try again, or run npm npm ERR! with --force to overwrite files recklessly. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\zwenliao\.npm\_logs\2020-07-06T03_31_36_024Z-debug.log
方案1:暴力解決,直接輸入指令
C:\WINDOWS\system32> npm install vue-cli -g --force
方案2:
錯誤是C:\Program Files\nodejs\vue.cmd檔案已經存在 需要刪除