npm 安装淘宝镜像报错 npm ERR! code EEXIST

报错:
C:\Users\Administrator\Desktop>npm install -g cnpm --registry=https://registry.npm.taobao.org
npm ERR! code EEXIST
npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\cnpm.cmd
npm ERR! Refusing to delete C:\Users\Administrator\AppData\Roaming\npm\cnpm.cmd: is outside C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm and not a link
npm ERR! File exists: C:\Users\Administrator\AppData\Roaming\npm\cnpm.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:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-03-02T07_50_50_641Z-debug.log

解决方式:Remove the existing file and try again

删除C:\Users\Administrator\AppData\Roaming\npm\  下的 cnpm文件

 

你可能感兴趣的:(Node.js)