npm升级报错,没有权限.ERRERR!The operation was rejected by your operating system. npm ERR!Error: EPERM: operation not permitted, rename
问题描述
Windows system32>npm installg npm
2335 error code EEXIST
2336 error path D:\Program Files\nodejs\npm.cmd
2337 error Refusing to delete D:\Program Files\nodejs\npm.cmd: is outside D:\Program Files\nodejs\node_modules\npm and not a link
2338 error File exists: D:\Program Files\nodejs\npm.cmd
2339 error Remove the existing file and try again, or run npm
2340 error with --force to overwrite files recklessly.
A complete log of this run can be found in: ERRc:\Users\abc\AppData Roaming npm-cache logs\2022-12-13T06 02 45 049Z-debug.log
C: Windows system32>npm install npm -g --force
解决方案:
npm config set prefix "D:\nodejs\node_global"
npm config set cache "D:\nodejs\node_cache"
参考文档:https://blog.csdn.net/qq_31989047/article/details/108755783
分析原因:估计是原来装过nodejs,然后系统权限发生过变更,原有文件夹失去了权限.
这个问题折磨了我,2天,哭死.
npm升级报错,没有权限.ERRERR!The operation was rejected by your operating system. npm ERR!Error: EPERM: operation not permitted, rename的更多相关文章
- npm ERR! { Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_cache\_locks'
vue项目安装json-server报错npm ERR! { Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodej ...
- "npm ERR! Error: EPERM: operation not permitted"问题解决
在基于macaca进行自动化测试的时候,遇到如下问题: E:\AutoTest\Macaca\LocalTEST\macaca-test-sample\macaca-test>macaca do ...
- 全局安装npm包报错没有权限
背景:npm i npm-check -g 时报错没有权限 Error: EACCES: permission denied, access '/usr/local/lib/node_modules' ...
- npm install 安装报错:npm ERR! EPERM npm ERR! -4048 npm ERR! Error: EPERM: operation not permitted, unlink 'D:\test\demo\code\materialT\node_modules\.staging'
更新项目依赖包,删除掉package-lock.json.node_modules,运行npm install,报如上错误信息,查询资料说是没有权限,本人用管理员身份打开powershell,运行np ...
- npm ERR! Error: EPERM: operation not permitted
转载于:https://blog.csdn.net/qq_36772866/article/details/86934950 win10 在npm install时报错 解决方案 删除node-mou ...
- pip升级报错(权限问题)
今天跟新pip的时候错一个接一个 看到拒绝访问应该是权限的问题,想起安装的时候选择谁可以使用软件(大概是这样的一个选项),选择了“只有我”,选择所有用户应该就不会存在这个问题了,那么怎么解决呢? 敲黑 ...
- WSL中使用npm install报错
报错内容类似下面的格式.具体解决方法请看这里:https://github.com/Microsoft/WSL/issues/14 着重关注 https://github.com/Microsoft/ ...
- 巨坑npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build/css/add.p
Windows10环境 npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build ...
- npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法
npm ERR! path E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_mod ...
- npm报错没有权限
在npm install经常会报错没有权限 这个时候需要清除一下缓存 npm cache clean --force
随机推荐
- 创建型模式 - 抽象工厂模式AbstractFactory
学习而来,代码是自己敲的.也有些自己的理解在里边,有问题希望大家指出. 模式的定义与特点 抽象工厂模式.是一种为访问类提供一个创建一组相关或相关一类对象的接口,且访问类无需指定所要的产品的具体类,就能 ...
- 【随笔记】Littlevgl 8.x 踩过的坑
在多线程并发使用的时候,总是在运行过程中莫名其妙的 crash,后面才意识到 LVGL 本身不支持并发,加了互斥锁解决了. 在引入矢量字库时(freetype),又有启动时会概率性 crash 的问题 ...
- 解决:ChatGPT too many requests in 1 hour.Try again later 怎么办?OpenAI 提示
ChatGPT 提示: Too many requests in 1 hour. Try again later. 如下图,我多次访问也出现同样的问题.中文意思是太多的请求数量在当前 1 个小时内,请 ...
- 【HMS Core】机器学习服务助力APP快速集成图像分割与上传功能
1.介绍 总览 机器学习服务(ML Kit)提供机器学习套件,为开发者使用机器学习能力开发各类应用,提供优质体验.得益于华为长期技术积累,ML Kit为开发者提供简单易用.服务多样.技术领先的机器 ...
- 计算机网络基础02-Internet结构,网络核心的数据交换,计算机网络性能几个参数
1 计算机网络的结构 1.1 网路边缘 主机.应用(软件.网站) 1.2 接入网络 1.3 网络核心 转发设备,路由器.交换机.关键功能就是路由+转发达到数据交换. 2 Internet的结构 2.1 ...
- 通过URL地址将图片保存到本地
今天一朋友问我如何通过URL地址将图片保存下来. 特地找了些资源,实现了一下代码: using System; using System.Drawing; using System.Drawing.I ...
- Android面试-字节一面
距离上次跳槽已经过了3年多,突然看到字节的HR来捞.想着自己好久没面了,就打算去试试看. 0. 准备 视频面试,不用去现场真的太赞了.由于项目比较忙,自己又不是特别想跳槽,所以没怎么准备.面试当天看了 ...
- 简单搭建react开发环境
目录 前言 一.node.js使用 二.vscode 1.打开文件 2.运行 3. 第一个react程序,从helloworld写起 总结 前言 安装前需要安装:node.js.vscode 一.no ...
- Networking && Internet 计网学习笔记一
Networking && Internet 计网学习笔记一 参考书籍: James F. Kurose, Keith W. Ross. 计算机网络-自顶向下方法 (7th). 机械工 ...
- C语言-补漏 -内存管理
8. 全局就是简简单单编写的 静态函数--只能在当前文件内使用的函数