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

问题就解决了。

相关推荐
Arong-tina8 小时前
VScode调试能实现和Pycharm一样的tensor shape,ssh远程连接linux服务器版
ide·vscode·pycharm
Patrick_Wilson8 小时前
你删过 lock 文件吗?聊聊包管理器迁移中 90% 的人会踩的坑
javascript·npm·前端工程化
学嵌入式的小杨同学9 小时前
STM32 进阶封神之路(二十五):ESP8266 深度解析 —— 从 WiFi 通信原理到 AT 指令开发(底层逻辑 + 实战基础)
c++·vscode·stm32·单片机·嵌入式硬件·mcu·智能硬件
专注VB编程开发20年9 小时前
vscode插件开发/ 编辑器 事件大全
ide·vscode·编辑器
FatHonor9 小时前
【golang学习之旅】使用VScode安装配置Go开发环境
vscode·学习·golang
不剪发的Tony老师10 小时前
Spyder:一款面向数据科学的Python集成开发环境
ide·python
少司府10 小时前
C++基础入门:第一个C++程序
java·c语言·开发语言·c++·ide
栗子甜酒10 小时前
统信系统下载VScode+Node
ide·vscode·编辑器
En^_^Joy12 小时前
Node.js开发指南:模块、npm与Webpack
webpack·npm·node.js
sjmaysee12 小时前
vscode配置django环境并创建django项目(全图文操作)
vscode·django·sqlite