npm -g install npm报错

npm ERR! path D:\laragon\bin\nodejs\node-v12\npm.cmd
npm ERR! code EEXIST
npm ERR! Refusing to delete D:\laragon\bin\nodejs\node-v12\npm.cmd: is outside D:\laragon\bin\nodejs\node-v12\node_modules\npm and not a link
npm ERR! File exists: D:\laragon\bin\nodejs\node-v12\npm.cmd
npm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\18462\AppData\Roaming\npm-cache\_logs\2020-06-09T13_58_46_978Z-debug.log

最后将D:\laragon\bin\nodejs\node-v12下的npm.cmd改成了npmx.cmd,其余有关npx和npm的文件全部删除。执行npmx -g install -npm命令,如果还不行就以管理员权限执行。

npm install -g npm升级失败

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。