VScode中npm install报错
本人小白,在VScode终端中进行npm install,报错,如下
PS E:\SVN\学生管理系统\代码\crqms\crqms-web> npm install
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path D:\Program Files (x86)\nodejs\node_cache\_locks
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'D:\Program Files (x86)\nodejs\node_cache\_locks'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'D:\Program Files (x86)\nodejs\node_cache\_locks'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
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.
找了好多办法,依然解决不了我的问题,根据上面的提示,我没有获得管理员权限,
于是,打开VScode用管理员身份打开,可是这样每次都这样,好麻烦。放弃这种方法
废话不说了,我的解决办法如下:
- 找到本机的node安装目录,我的目录是:D:\Program Files (x86)\nodejs
- 随意右击nodejs中的一个文件,观察它的删除和重命名,发现前面有个盾牌,如下所示
- 这个盾牌意思是需要管理员权限的,普通用户是没有它的所有权限,所以我们需要给普通用户添加管理员一样的权限
- 右击nodejs文件夹,点击属性
- 点击安全
- 点击编辑
将这些权限都勾选上,点击“应用”,出现如下:
点击“确定”后,在打开原来的nodejs文件夹,右键查看,发现已经没有盾牌了
再到VScode中进行npm install
成功解决了
VScode中npm install报错相关推荐
- vscode输入npm install报错
vscode输入npm install报错 主问题 时间:2021.12.04 问题描述:安装node.js后,在vscode控制台中输入npm install报出错误如下图: 问题根因:需要用管理员 ...
- npm install报错:This version of npm is compatible with lockfileVersion@1, but package-lock.json was ge
npm install报错:This version of npm is compatible with lockfileVersion@1, but package-lock.json was ge ...
- 关于npm install报错
我是刚学得vue,现在刚刚下载了node镜像,在最后第二步得时候报错了,npm install报错,说我得packlock.json有问题,我得步骤是这样得 1.全局安装node镜像,npm inst ...
- npm install 报错:xx/git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
npm install 报错:xx/git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git 网上的教程是这样: git c ...
- npm install 报错:ERR! code EINTEGRITY 解决方案
npm install 报错:ERR! code EINTEGRITY 解决方案 参考文章: (1)npm install 报错:ERR! code EINTEGRITY 解决方案 (2)https: ...
- npm install 报错: WARN checkPermissions Missing write access to 解决方案
npm install 报错: WARN checkPermissions Missing write access to 解决方案 参考文章: (1)npm install 报错: WARN che ...
- npm install 报错 npm WARN tar ENOENT: no such file or directory, open... 解决方式
报错信息 npm install 报错 npm WARN tar ENOENT: no such file or directory, open- 解决方式 使用cnpm install
- npm install报错 npm ERR,code ERESOLVE npm ERR,ERESOLVE unable to resolve dependency tree
文章目录 前言 问题分析 解决方法 转载于 前言 在下载npm时报错npm ERR! code ERESOLVE npm ERR! ERESOLEVE unable to resolve depend ...
- npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法
npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法 参考文章: (1)npm install ...
最新文章
- 制作ui设计作品集要注意哪些
- 一周成python大神_python大神进阶路线
- 直播APP开发:直播人数是否该有限制
- 5.hadoop常用命令
- Windows系统中文件解说
- 疯狂捕鱼之路径解决方案的思考
- opencv鼠标操作,画矩形
- Linux使用Jexus托管Asp.Net Core应用程序
- gis影像格式img转为ecw_医学影像图片格式
- 今晚直播丨有关Oracle 19c认证体系的一些变化及备考技巧
- java调用webservice_Oracle触发器调用webservice说明
- laravel php环境,Laravel 5框架学习之环境与配置
- 掌握好这几点方法学习Linux,一定比别人更快入门运维!
- 如何学习opencv
- Matlab实现人脸识别
- openai_ros教程( ros gazebo 深度强化学习)
- node.js离线库
- 各种门锁的内部结构图_有没有这种执手门锁的内部结构图?
- Silverlight Tools 3 安装时发生严重错误
- 通过wifi进行adb远程连接手机进行调试