npm ERR!错误:EPERM:不允许操作,请重命名 [英] npm ERR! Error: EPERM: operation not permitted, rename

查看:739
本文介绍了npm ERR!错误:EPERM:不允许操作,请重命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行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
    • 推荐答案

      在我看来,这很有帮助. 在继续执行这些命令之前,请关闭所有VS Code实例.

      In my situation this helped. Before proceeding to execute these commands close all VS Code instances.

      1. 使用

      1. clean cache with

      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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆