报错:npm ERR! code EPERM npm ERR! syscall open npm ERR! path E:\softwareDevelopment\node\node_cache...

在vscode中执行npm install安装依赖包报错:
npm ERR! path E:\softwareDevelopment\node\node_cache\_cacache\tmp\ed3c9209

npm ERR! errno -4048

npm ERR! Error: EPERM: operation not permitted, open 'E:\softwareDevelopment\node\node_cache\_cacache\tmp\ed3c9209'

npm ERR!  [Error: EPERM: operation not permitted, open 'E:\softwareDevelopment\node\node_cache\_cacache\tmp\ed3c9209'] {

npm ERR!  errno: -4048,

npm ERR!  code: 'EPERM',

npm ERR!  syscall: 'open',

npm ERR!  path: 'E:\\softwareDevelopment\\node\\node_cache\\_cacache\\tmp\\ed3c9209'

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.

npm ERR! A complete log of this run can be found in:




明显是vscode没有执行cmd命令权限

网上一堆瞎整,删除什么.npmc文件。

解决方案:直接管理员身份运行cmd,到该项目目录下执行 npm install 安装依赖即可

你可能感兴趣的:(报错:npm ERR! code EPERM npm ERR! syscall open npm ERR! path E:\softwareDevelopment\node\node_cache...)