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
随机推荐
- Redis01 Redis详细介绍
参考:https://blog.csdn.net/u011863024/article/details/107476187 学习视频 redis官网 redis中文网 JAVA源码 1 sql的发展 ...
- windows10环境下的RabbitMQ安装步骤
RabbitMQ是一个在AMQP协议标准基础上完整的,可复用的企业消息系统.它遵循Mozilla Public License开源协议,采用 Erlang 实现的工业级的消息队列(MQ)服务器,Rab ...
- P16_发布-小程序的推广与运行数据的查看
协同工作和发布 - 发布上线 基于小程序码进行推广 相对于普通二维码来说,小程序码的优势如下: 在样式上更具辨识度和视觉冲击力 能够更加清晰地树立小程序的品牌形象 可以帮助开发者更好地推广小程序 获取 ...
- react 高效高质量搭建后台系统 系列 —— 前端权限
其他章节请看: react 高效高质量搭建后台系统 系列 权限 本系列已近尾声,权限是后台系统必不可少的一部分,本篇首先分析spug项目中权限的实现,最后在将权限加入到我们的项目中来. spug 中权 ...
- Python关键字 asynico
同步和异步 同步和异步是指程序的执行方式.在同步执行中,程序会按顺序一个接一个地执行任务,直到当前任务完成.而在异步执行中,程序会在等待当前任务完成的同时,执行其他任务. 同步执行意味着程序会阻塞,等 ...
- vue + element-ui + qrcodejs2 实现二维码生成
1.在所在项目下安装插件 npm i qrcodejs2 2.在需要生成二维码的页面引入qrcodejs import QRCode from 'qrcodejs2' 3.使用 <el-butt ...
- Windows 串口代码
#pragma once #include <Windows.h> #define DEFAULT_THREAD_TERMINATED_TIME 2000 class CAutoThrea ...
- 基于SpringBoot实现操作GaussDB(DWS)的项目实战
摘要:本文就使用springboot结合mybatis plus在项目中实现对GaussDB(DWS)的增删改查操作. 本文分享自华为云社区<基于SpringBoot实现操作GaussDB(DW ...
- Quartz.Net 主要概念介绍和吐槽
我们经常遇到需要定时执行某些任务的情况,比如清理缓存.异步结果轮询等,如果不打算造轮子,那么选择一款合适的定时任务组件就很关键了.所幸,.Net 世界中的选项并不多:) 选型 主要有以下四款: Qua ...
- PostgreSQL 实现快速删除一个用户
一.具体方法 一般情况下直接执行 drop role xxx; 就可以把这个用户删除.但是很多时候会因为用户有依赖而报错. 二.权限依赖 postgres=# create role test wit ...