npm进行搭建vue框架时报错:npm ERR! Remove the existing file and try again, or run npm(转)

遇到同样的错误找到解决办法:
https://zhaocunwei.blog.csdn.net/article/details/105253781?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromBaidu-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromBaidu-1.control

通过npm进行搭建vue时报如下错误:

C:\Users\Administrator>npm i vue-cli -g
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
C:\Users\Administrator\AppData\Roaming\npm\vue-init -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init
C:\Users\Administrator\AppData\Roaming\npm\vue-list -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-list
npm ERR! code EEXIST
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue-cli\bin\vue
npm ERR! dest C:\Users\Administrator\AppData\Roaming\npm\vue
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue-cli\bin\vue' -> 'C:\Users\Administrator\AppData\Roaming\npm\vue'
npm ERR! File exists: C:\Users\Administrator\AppData\Roaming\npm\vue
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\Administrator\AppData\Roaming\npm-cache_logs\2020-04-02T04_47_14_561Z-debug.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

解决办法

在这里插入图片描述

(Remove the existing file and try again, or run npm),删除现有的文件并且重试
直接前往 C:\Users\Administrator\AppData\Roaming\npm\vue找到这个vue文件然后删除,在重新全局安装,就可以了

posted @ 2021-01-12 18:52  未来全栈攻城狮  阅读(4286)  评论(0编辑  收藏  举报