npm ERR!错误:EPERM:不允许操作,请重命名 [英] npm ERR! Error: EPERM: operation not permitted, rename
问题描述
执行npm install
时出现此错误
npm ERR!错误:EPERM:不允许操作,请重命名C:\ projects ****** \ node_modules \ react-async-script'->'C:\ projects ******* \ node_modules.react-async-script .DELETE'
npm ERR! Error: EPERM: operation not permitted, rename C:\projects******\node_modules\react-async-script' -> 'C:\projects*******\node_modules.react-async-script.DELETE'
- 我正在以管理员身份运行cmd
- 我之前跑过
npm cache clean
- 我确保所有其他应用程序都没有与
node_modules
打开 相关的任何内容
- I am running the cmd as administrator
- I ran
npm cache clean
before - I made sure all the other applications don't have anything related to
node_modules
open -
使用
clean cache with
推荐答案
在我看来,这很有帮助. 在继续执行这些命令之前,请关闭所有VS Code实例.
In my situation this helped. Before proceeding to execute these commands close all VS Code instances.
npm cache clean --force
以管理员身份全局安装最新版本的npm:
install the latest version of npm globally as admin:
npm install -g npm@latest --force
使用
clean cache with
npm cache clean --force
尝试再次安装组件.
Try to install your component once again.
我希望这可以解决您的问题.如果没有,您可以暂时禁用防病毒程序,然后重试.
I hope this fix your issue. If not, you may temporarily disable your antivirus program and try again.
这篇关于npm ERR!错误:EPERM:不允许操作,请重命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!