在vscode中執(zhí)行npm install安裝依賴包報(bào)錯(cuò):
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:
網(wǎng)上一堆瞎整,刪除什么.npmc文件雕蔽。
解決方案:直接管理員身份運(yùn)行cmd裁替,到該項(xiàng)目目錄下執(zhí)行 npm install 安裝依賴即可