项目场景:
npm ERR! code EEXIST
npm ERR! path D:\nodejs\node_globalnpm\node_modules\@vue\cli\bin\vue.js
npm ERR! dest D:\nodejs\node_globalnpm\vue
npm ERR! EEXIST: file already exists, cmd shim 'D:\nodejs\node_globalnpm\node_modules\@vue\cli\bin\vue.js' -> 'D:\nodejs\node_globalnpm\vue'
npm ERR! File exists: D:\nodejs\node_globalnpm\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:\Program Files\nodejs\node_cache\_logs\2021-01-25T07_14_17_763Z-debug.log
问题描述:
原因分析:
主要原因是安装vue的版本过低。
解决方案:
npm install -g @vue/cli --force
可以强制覆盖以前旧版本的vue-cli脚手架
完美解决。
忍别人所不能忍的痛,吃别人所别人所不能吃的苦,是为了收获得不到的收获。
参考博客:
https://blog.csdn.net/u010325193/article/details/104274230