当前位置:网站首页>npm安装依赖报错npm ERR! code ENOTFOUNDnpm ERR! syscall getaddrinfonpm ERR! errno ENOTFOUND
npm安装依赖报错npm ERR! code ENOTFOUNDnpm ERR! syscall getaddrinfonpm ERR! errno ENOTFOUND
2022-08-04 05:16:00 【S筱潇S四维Smile】
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.cnpmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz failed, reason: getaddrinfo ENOTFOUND registry.cnpmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'根据网上搜的解决方法:
1、执行:
npm config get proxy
npm config get https-proxy
如果返回值不为null,继续执行:
(这一步很重要,一定要保证两个命令的返回值都为null,话说回来,应该出现这个错误这两个返回值有不为null的)
npm config set proxy null
npm config set https-proxy null
2、执行:
npm config set registry https://registry.cnpmjs.org/试了一下我的还是不行,然后又搜别的方法:
直接修改npmrc文件,就是npm的配置文件所在位置。
因为是隐藏文件,直接搜索文件即可

打开修改该文件即可:
http-proxy=http://proxyhost/:proxyport
strict-ssl=false
registry=https://registry.npmjs.org/
然后重新安装依赖就可以了
边栏推荐
- 深度学习21天——卷积神经网络(CNN):实现mnist手写数字识别(第1天)
- 信息学奥赛一本通 1312:【例3.4】昆虫繁殖
- TSF微服务治理实战系列(一)——治理蓝图
- 3面头条,花7天整理了面试题和学习笔记,已正式入职半个月
- 《看见新力量》第四期免费下载!走进十五位科技创业者的精彩故事
- 符号表
- C Expert Programming Chapter 4 The Shocking Fact: Arrays and pointers are not the same 4.4 Matching declarations to definitions
- FPGA学习笔记——知识点总结
- [C language advanced] program environment and preprocessing
- 【21天学习挑战赛】直接插入排序
猜你喜欢
随机推荐
Use Patroni callback script to bind VIP pit
注意!软件供应链安全挑战持续升级
商城系统APP如何开发 都有哪些步骤
Turn: Management is the love of possibility, and managers must have the courage to break into the unknown
Dynamic programming of the division of numbers
The difference between px, em, and rem
Interesting Kotlin 0x0E: DeepRecursiveFunction
备份工具pg_dump的使用《postgres》
Large chain best freight d audit with what software?What are the functions?
如何将 DevSecOps 引入企业?
As soon as flink cdc is started, the CPU of the source Oracle server soars to more than 80%. What is the reason?
获取单选框选中内容
C专家编程 第5章 对链接的思考 5.4 警惕Interpositioning
mysql index notes
【21天学习挑战赛】直接插入排序
OpenGL绘制圆
符号表
【评价类模型】Topsis法(优劣解距离法)
flink cdc一启动,源端Oracle那台服务器的CPU就飙升到80%以上,会是啥原因呢?
大型连锁百货运维审计用什么软件好?有哪些功能?









