错误
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path D:\JAVA\nodejs\node_cache\_cacache\tmp\d20eb799
npm ERR! errno EPERM
npm ERR! FetchError: Invalid response body while trying to fetch http://registry.npm.taobao.org/@vue%2fcli-plugin-babel: EPERM: operation not permitted, open 'D:\JAVA\nodejs\node_cache
\_cacache\tmp\d20eb799'
npm ERR! at D:\JAVA\nodejs\node_global\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15
npm ERR! at async Arborist.[nodeFromEdge] (D:\JAVA\nodejs\node_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1061:19)
npm ERR! at async Arborist.[buildDepStep] (D:\JAVA\nodejs\node_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:930:11)
npm ERR! at async Arborist.buildIdealTree (D:\JAVA\nodejs\node_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:216:7)
npm ERR! at async Promise.all (index 1)
npm ERR! at async Arborist.reify (D:\JAVA\nodejs\node_global\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:149:5)
npm ERR! at async Install.install (D:\JAVA\nodejs\node_global\node_modules\npm\lib\install.js:170:5) {
npm ERR! code: 'EPERM',
npm ERR! errno: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'D:\\JAVA\\nodejs\\node_cache\\_cacache\\tmp\\d20eb799',
npm ERR! type: 'system',
npm ERR! requiredBy: '.'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
解决办法
找了几个博主,大家都是一样的解决办法,贴出来记录一下:
方法一:
删除 C:/users/{个人账户}/下的 .npmrc 文件;
然后运行 npm install ;
方法二:
直接运行命令:
npm clean --force
npm install
放上参考:
https://blog.csdn.net/qq_42780155/article/details/119025638
https://www.jianshu.com/p/ac1f0a5a0963
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/157317.html