安装vue-cli时报错 npm ERR! code EEXIST

执行npm install -g @vue/cli

npm ERR! code EEXIST
npm ERR! path C:\Users\Gypsophila\AppData\Roaming\npm\node_modules@vue\cli\node_modules_apollo-codegen-core@0.39.1@apollo-codegen-core\node_modules@babel\generator\node_modules.bin\jsesc.ps1
npm ERR! Refusing to delete C:\Users\Gypsophila\AppData\Roaming\npm\node_modules@vue\cli\node_modules_apollo-codegen-core@0.39.1@apollo-codegen-core\node_modules@babel\generator\node_modules.bin\jsesc.ps1: …/…/…/…/_jsesc@2.5.2@jsesc/bin/jsesc symlink target is not controlled by npm C:\Users\Gypsophila\AppData\Roaming\npm\node_modules@vue\cli\node_modules_apollo-codegen-core@0.39.1@apollo-codegen-core\node_modules@babel\generator\node_modules\jsesc
npm ERR! File exists: C:\Users\Gypsophila\AppData\Roaming\npm\node_modules@vue\cli\node_modules_apollo-codegen-core@0.39.1@apollo-codegen-core\node_modules@babel\generator\node_modules.bin\jsesc.ps1
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\Gypsophila\AppData\Roaming\npm-cache_logs\2021-07-07T10_55_48_714Z-debug.log
在这里插入图片描述
使用管理员权限启动cmd也无效,后来直接删除node_modules下的@vue文件夹,再执行
npm install -g @vue/cli
就可以安装了

Logo

前往低代码交流专区

更多推荐