Npm install webpack Error: EPERM: operation not permitted

举报
隔壁老汪 发表于 2022/06/25 00:01:04 2022/06/25
【摘要】 npm ERR! path C:\Users\wangxb147\AppData\Roaming\npm\webpacknpm ERR! code EPERMnpm ERR! errno -4048npm ERR! syscall opennpm ERR! Error: EPERM: operation not permitted, o...

      npm ERR! path C:\Users\wangxb147\AppData\Roaming\npm\webpack
      npm ERR! code EPERM
      npm ERR! errno -4048
      npm ERR! syscall open
      npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\wangxb147\AppData\Roaming\npm\webpack'
      npm ERR!  [OperationalError: EPERM: operation not permitted, open 'C:\Users\wangxb147\AppData\Roaming\npm\webpack'] {
      npm ERR!   cause: [Error: EPERM: operation not permitted, open 'C:\Users\wangxb147\AppData\Roaming\npm\webpack'] {
      npm ERR!     errno: -4048,
      npm ERR!     code: 'EPERM',
      npm ERR!     syscall: 'open',
      npm ERR!     path: 'C:\\Users\\wangxb147\\AppData\\Roaming\\npm\\webpack'
      npm ERR!   },
      npm ERR!   stack: "Error: EPERM: operation not permitted, open 'C:\\Users\\wangxb147\\AppData\\Roaming\\npm\\webpack'",
      npm ERR!   errno: -4048,
      npm ERR!   code: 'EPERM',
      npm ERR!   syscall: 'open',
      npm ERR!   path: 'C:\\Users\\wangxb147\\AppData\\Roaming\\npm\\webpack'
      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 (though this is not recommended).
      npm ERR! A complete log of this run can be found in:
      npm ERR!     C:\Users\wangxb147\AppData\Roaming\npm-cache\_logs\2019-07-09T02_48_29_416Z-debug.log
  
 

今天我的node莫名其妙报错,然后我打算删除它重新下载一下。我使用了rimraf进行删除,很简单,建议在全局下下载此命令

npm install -g rimraf
然后在需要 删除文件的父文件夹下执行如下命令

rimraf node_modules
//这个命令不仅仅可删除该文件夹 rimraf *** (***代表你要删除的文件夹名称)
然后出现了错误

EPERM: operation not permitted, unlink 'E:\node_modules\@types'
有可能是你的VSCode还在打开状态,我建议你现将其关闭,然后执行删除命令,就ok了
 

文章来源: blog.csdn.net,作者:隔壁老瓦,版权归原作者所有,如需转载,请联系作者。

原文链接:blog.csdn.net/wxb880114/article/details/95175336

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。