当前位置:网站首页>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/
然后重新安装依赖就可以了
边栏推荐
- 解决错误:npm WARN config global `--global`, `--local` are deprecated
- 某母婴小程序加密参数解密
- How to dynamically add script dependent scripts
- 大型连锁百货运维审计用什么软件好?有哪些功能?
- What is the salary of a software testing student?
- Interesting Kotlin 0x0E: DeepRecursiveFunction
- Large chain best freight d audit with what software?What are the functions?
- 读者让我总结一波 redis 面试题,现在肝出来了
- 符号表
- 【SemiDrive源码分析】【MailBox核间通信】47 - 分析RPMSG_IPCC_RPC 方式 单次传输的极限大小 及 极限带宽测试
猜你喜欢

高性能高可靠性高扩展性分布式防火墙架构

Teenage Achievement Hackers Need These Skills

SLSA 框架与软件供应链安全防护

7-3 LVS+Keepalived Cluster Description and Deployment

System design. How to design a spike system (full version transfer)

Converts XML tags to TXT format (voc conversion for yolo convenient training)

使用Loadrunner进行性能测试

深度学习环境配置

Get the selected content of the radio box

Structure function exercise
随机推荐
Landing, the IFC, GFC, FFC concept, layout rules, forming method, use is analysed
[SemiDrive source code analysis] [MailBox inter-core communication] 47 - Analysis of RPMSG_IPCC_RPC mode limit size of single transmission and limit bandwidth test
Dynamic programming of the division of numbers
【21 Days Learning Challenge】Direct Insertion Sort
DataTable使用Linq进行分组汇总,将Linq结果集转化为DataTable
mysql index notes
How to view sql execution plan offline collection
3000 words, is take you understand machine learning!
8. Haproxy builds a web cluster
Programming hodgepodge (4)
OpenGL绘制一个圆锥
力扣题解8/3
擎朗智能全国研发创新中心落地光谷:去年曾获2亿美元融资
震惊,99.9% 的同学没有真正理解字符串的不可变性
深度学习21天——卷积神经网络(CNN):实现mnist手写数字识别(第1天)
C专家编程 第5章 对链接的思考 5.1 函数库、链接和载入
大型连锁百货运维审计用什么软件好?有哪些功能?
[Cocos 3.5.2]开启模型合批
关于yolo7和gpu
Typora 使用保姆级教程 | 看这一篇就够了 | 历史版本已被禁用