npm命令 安装vue脚手架

npm install -g @vue/cli
出现如下错误

npm ERR! code EEXIST
npm ERR! path D:\nodejs\node_global\node_modules\@vue\cli\bin\vue.js
npm ERR! dest D:\nodejs\node_global\vue
npm ERR! EEXIST: file already exists, cmd shim 'D:\nodejs\node_global\node_modules\@vue\cli\bin\vue.js' -> 'D:\nodejs\node_global\vue'
npm ERR! File exists: D:\nodejs\node_global\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!     D:\nodejs\node_cache\_logs\2020-12-14T05_41_53_499Z-debug.log
解决方案:

删除node_global\node_modules的node_modules文件夹,重新下载依赖就ok了

Logo

前往低代码交流专区

更多推荐