1.报错信息
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Node\node_cache_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:\Node\node_cache_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa'
npm ERR! [Error: EPERM: operation not permitted, open 'C:\Node\node_cache_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\Node\node_cache\_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa',
npm ERR! requiredBy: '.'
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
2.原因
操作权限不足,此处截图在终端打开,与vscode打开相同,终端采用管理员权限打开,一样可以正常安装
3.解决
使用管理员身份打开vscode