vscode终端npm install报错

报错如下:

复制代码
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best 
with it!
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'E:\NODEJS\node_cache\_cacache\tmp\c606bc49'
npm ERR!  [OperationalError: EPERM: operation not permitted, open 'E:\NODEJS\node_cache\_cacache\tmp\c606bc49'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, open 'E:\NODEJS\node_cache\_cacache\tmp\c606bc49'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'open',
npm ERR!     path: 'E:\\NODEJS\\node_cache\\_cacache\\tmp\\c606bc49'
npm ERR!   },
npm ERR!   isOperational: true,
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'E:\\NODEJS\\node_cache\\_cacache\\tmp\\c606bc49'
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! the command again as root/Administrator.

说明是权限问题。

把nodejs文件的权限改一下。右键-属性-安全

问题就解决了。

相关推荐
天疆说11 小时前
在 Ubuntu 的 VSCode 中配置 MATLAB
vscode·ubuntu·matlab
春日见1 天前
vscode的AI编程插件推荐:
大数据·ide·vscode·算法·机器学习·编辑器·ai编程
lazy H1 天前
Spring Boot 项目如何连接 Redis?新手入门配置和常见错误总结
ide·spring boot·redis·后端·学习·intellij-idea
2601_962054951 天前
终端与IDE形态的vibe coding实测:两款AI编程工具迭代能力对比
数据库·ide·ai编程
jieshenai1 天前
VScode sys.path,并使CTRL+左键可访问源码
ide·vscode·编辑器
qq_448011161 天前
VSCode环境搭建
ide·vscode·编辑器
qq_338432371 天前
VSCode Remote-SSH 远程 Windows Server 卡死的排查与解决
windows·vscode·ssh
潇凝子潇1 天前
IDEA插件
java·ide·intellij-idea
程序媛kelly1 天前
如何打开 .md / .ipynb 文件?Markdown 与 Jupyter Notebook 本地预览全攻略
ide·python·jupyter
AndyHuang19761 天前
【避坑指南】Visual Studio 插件报错 “Windows Terminal (wt.exe) was not found in PATH“ 完美解决
ide·windows·visual studio