Npm install webpack Error: EPERM: operation not permitted

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了
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

未来AI编程

共鸣===鼓励 打赏您随意

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值