vue-cli安装失败解决方案

Posted chineseliao

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue-cli安装失败解决方案相关的知识,希望对你有一定的参考价值。

C:WINDOWSsystem32>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 is no longer with us. It will be missed.
npm WARN rm not removing C:Program Files
odejsvue.ps1 as it wasnt installed by C:Program Files
odejs
ode_modulesvue-cli
npm WARN rm not removing C:Program Files
odejsvue.cmd as it wasnt installed by C:Program Files
odejs
ode_modulesvue-cli
npm WARN rm not removing C:Program Files
odejsvue as it wasnt installed by C:Program Files
odejs
ode_modulesvue-cli
C:Program Files
odejsvue-init -> C:Program Files
odejs
ode_modulesvue-cliinvue-init
C:Program Files
odejsvue-list -> C:Program Files
odejs
ode_modulesvue-cliinvue-list
npm ERR! code EEXIST
npm ERR! path C:Program Files
odejs
ode_modulesvue-cliinvue
npm ERR! dest C:Program Files
odejsvue.cmd
npm ERR! EEXIST: file already exists, cmd shim C:Program Files
odejs
ode_modulesvue-cliinvue -> C:Program Files
odejsvue.cmd
npm ERR! File exists: C:Program Files
odejsvue.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:Userszwenliao.npm\_logs2020-07-06T03_31_36_024Z-debug.log

方案1:暴力解决,直接输入指令

C:WINDOWSsystem32> npm install vue-cli -g  --force

方案2:

错误是C:Program Files odejsvue.cmd文件已经存在 需要删除

方案2参考链接

以上是关于vue-cli安装失败解决方案的主要内容,如果未能解决你的问题,请参考以下文章

vue-cli 项目安装失败 tunneling socket could not be established, cause=connect ECONNREFUSED

Vue 命令行工具 Vue-CLI 详解

Vue 命令行工具 Vue-CLI 详解

安装vue-cli遇到Please try running this command again as root/Administrator的解决方案

vue-cli 安装失败Failed to download repo vuejs-templates/vuedemo: Response code 404 (Not Found)

Oracle 数据库 - 使用UEStudio修改dmp文件版本号,解决imp命令恢复的数据库与dmp本地文件版本号不匹配导致的导入失败问题,“ORACLE error 12547”问题处理(代码片段