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...

  
  1. npm ERR! path C:\Users\wangxb147\AppData\Roaming\npm\webpack
  2. npm ERR! code EPERM
  3. npm ERR! errno -4048
  4. npm ERR! syscall open
  5. npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\wangxb147\AppData\Roaming\npm\webpack'
  6. npm ERR! [OperationalError: EPERM: operation not permitted, open 'C:\Users\wangxb147\AppData\Roaming\npm\webpack'] {
  7. npm ERR! cause: [Error: EPERM: operation not permitted, open 'C:\Users\wangxb147\AppData\Roaming\npm\webpack'] {
  8. npm ERR! errno: -4048,
  9. npm ERR! code: 'EPERM',
  10. npm ERR! syscall: 'open',
  11. npm ERR! path: 'C:\\Users\\wangxb147\\AppData\\Roaming\\npm\\webpack'
  12. npm ERR! },
  13. npm ERR! stack: "Error: EPERM: operation not permitted, open 'C:\\Users\\wangxb147\\AppData\\Roaming\\npm\\webpack'",
  14. npm ERR! errno: -4048,
  15. npm ERR! code: 'EPERM',
  16. npm ERR! syscall: 'open',
  17. npm ERR! path: 'C:\\Users\\wangxb147\\AppData\\Roaming\\npm\\webpack'
  18. npm ERR! }
  19. npm ERR!
  20. npm ERR! The operation was rejected by your operating system.
  21. npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
  22. npm ERR! or that you lack permissions to access it.
  23. npm ERR!
  24. npm ERR! If you believe this might be a permissions issue, please double-check the
  25. npm ERR! permissions of the file and its containing directories, or try running
  26. npm ERR! the command again as root/Administrator (though this is not recommended).
  27. npm ERR! A complete log of this run can be found in:
  28. 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个月内不可修改。