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了