npm install 报错 -4048
方法1:
删除npmrc文件。
强调:不是nodejs安装目录npm模块下的那个npmrc文件,而是在C:\Users\{账户}\下的.npmrc文件。
方法2:
https://www.jianshu.com/p/382f2961651e
或者直接用命令清理就行,控制台输入:npm cache clean --force
方法3:
卸载了node,重新安装了最新的稳定版本。
进入项目目录,把node_modules文件夹删除,package-lock.json文件也删除,再执行npm install。
漫长的等待:

参考:
npm更换成淘宝镜像源以及cnpm:https://www.jianshu.com/p/fae87fef8ad0
命令行:
查看包的所有版本:npm view node versions
cnpm:npm install -g cnpm --registry=https://registry.npm.taobao.org
npm淘宝镜像:npm config set registry https://registry.npm.taobao.org
npm install 报错 -4048的更多相关文章
- 使用npm install报错-4048 operation not permitted解决
刚刚使用npm install时一直报错-4048 operation not permitted,也尝试了多种方法,终于使问题得到解决,这里总结几种方法,先贴图: 一:权限问题 首先看到operat ...
- 执行npm install报错:npm ERR! code EINTEGRITY
命令行执行npm install报错如下: D:\frontend\viewsdev>npm install npm ERR! code EINTEGRITY npm ERR! sha512-8 ...
- npm install 报错:node-pre-gyp ERR! 问题解决
npm install报错问题解决 问题: E:\CodeSpace\GitlabTest\desktop>npm install > lifeccp-desktop@1.1.9 post ...
- npm install 报错 error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,"d' 解决办法
npm install 报错 : error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,& ...
- 在运行vue项目时,执行npm install报错小记
在运行vue项目时,执行npm install 报错,导致后续的执行报各种错误,根据报错,尝试了网上的各种办法,最后发现时网络问题下载失败导致,解决办法: 安装cnpm==>npm instal ...
- npm install 报错解决办法
npm install 报错解决办法 原因是因为node_modules可能有意外改动,导致依赖库不完整,删除项目下的node_modules,在你的项目目录下,重新执行npm install,这会重 ...
- 使用npm install报错- operation not permitted解决
原文:https://blog.csdn.net/weixin_41715295/article/details/79508104 这几天使用npm install时一直报错-4048 operati ...
- npm install 报错:ERR! code EINTEGRITY 解决方案
npm升级后,npm install 报错了,报错信息:ERR! code EINTEGRITY到处百度搜索解决方案,终于找到了!“npm cache verify”这条命令帮助了不少人 npm ca ...
- npm install 报错,提示`gyp ERR! stack Error: EACCES: permission denied` 解决方法
m install 报错,提示gyp ERR! stack Error: EACCES: permission denied 猜测可能是因为没有权限读写,ls -la看下文件权限设置情况 [root@ ...
随机推荐
- Java collection 集合类架构
https://www.cnblogs.com/fireflyupup/p/4875130.html Collection List 在Collection的基础上引入了有序的概念,位置精确:允许相同 ...
- classmethod,staticmethod,反射,魔法方法,单例模式
目录 classmethod staticmethod instance issubclass 反射 hasatter getatter setatter delatter 魔法方法 单例模式 什么是 ...
- [PHP] 新版本PHP7.4与新版本MySQL8认证问题
mysql8的默认密码加密方式是caching_sha2_password,PHP7.4连接mysql的加密方式也为caching_sha2_password,这个地方要注意. 当为了兼容旧版的客户端 ...
- 动态链接库(Dynamic Link Library)
DLL INTRODUCTION A DLL is a library that contains code and data that can be used by more than one pr ...
- STL关联容器的基本操作
关联容器 map,set map map是一种关联式容器包含 键/值 key/value 相当于python中的字典不允许有重复的keymap 无重复,有序 Map是STL的一个关联容器,它提供一对一 ...
- react中antd的表格自定义展开
antd的表格官方案例中给出的都是固定的图表展开,在做需求的时候,需要使用点击最后一列,然后出现展开内容,实现效果图如下 在最开始设置一个全局变量 const keys = [];在设置列参数的函数中 ...
- 初学JavaScript正则表达式(一)
给单个单词is改为大写的IS \bis\b // \b指的是单词边界 IS He is a boy This is a test isn't it 给以http://开头并且以jpg结尾的链接删除掉h ...
- 7、zabbix自定义监控阈值-前端页面报警
找个值监控一下: #监控passwd #默认是间隔是1小时,我们改成10秒,下面我们要把报警打开 #我们在被监控上的主机上创建一个新用户,过10秒,界面上就会报警了 ----------------- ...
- Vue props中Object和Array设置默认值
Vue中,在props中设置Object和Array的默认值 seller: { type: Object, default() { return {} } } seller: { type: Obj ...
- 《高性能MySQL》读后感——聚簇索引
<高性能MySQL>读后感——聚簇索引 聚簇索引并不是一种单独的索引类型,而是一种数据存储方式.比如,InnoDB的聚簇索引使用B+Tree的数据结构存储索引和数据. 当表有聚簇索引时,它 ...