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文件的权限改一下。右键-属性-安全

问题就解决了。

相关推荐
先跑起来再说2 小时前
Git 入门到实战:一篇搞懂安装、命令、远程仓库与 IDEA 集成
ide·git·后端·elasticsearch·golang·intellij-idea
Hello.Reader3 小时前
Flink 文件系统通用配置默认文件系统与连接数限制实战
vue.js·flink·npm
-凌凌漆-3 小时前
【npm】npm的-D选项介绍
前端·npm·node.js
嵌入小生0074 小时前
标准IO---核心函数接口延续(嵌入式Linux)
c语言·vscode·vim·嵌入式·小白·标准io·函数接口
LYOBOYI1234 小时前
vscode界面美化
ide·vscode·编辑器
mailangduoduo8 小时前
零基础教学连接远程服务器部署项目——VScode版本
服务器·pytorch·vscode·深度学习·ssh·gpu算力
骥龙21 小时前
第六篇:AI平台篇 - 从Jupyter Notebook到生产级模型服务
ide·人工智能·jupyter
kun200310291 天前
如何用Obsidian+VSCode生成文案排版并发布到公众号
ide·vscode·编辑器
开源技术1 天前
Python GeoPandas基础知识:地图、投影和空间连接
开发语言·ide·python
暴走十八步1 天前
PHP+vscode开启调试debug
开发语言·vscode·php