npm 错误!错误:EPERM:不允许操作,重命名 [英] npm ERR! Error: EPERM: operation not permitted, rename
问题描述
当我执行 npm install
时出现这个错误
When I execute npm install
I get this error
npm 错误!错误:EPERM:不允许操作,重命名 C:projects****** ode_modules eact-async-script' -> 'C:projects******* ode_modules.react-async-script.DELETE'
npm ERR! Error: EPERM: operation not permitted, rename C:projects****** ode_modules eact-async-script' -> 'C:projects******* ode_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 使用
推荐答案
在我的情况下,这有帮助:
In my situation this helped:
在继续执行这些命令之前关闭所有 VS Code 实例.
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 错误!错误:EPERM:不允许操作,重命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!