当前位置:网站首页>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/
然后重新安装依赖就可以了
边栏推荐
- See how DevExpress enriches chart styles and how it empowers fund companies to innovate their business
- For Qixi Festival, I made a confession envelope with code
- Will the 2023 PMP exam use the new version of the textbook?Reply is here!
- idea设置识别.sql文件类型以及其他文件类型
- 心余力绌:企业面临的软件供应链安全困境
- C专家编程 第5章 对链接的思考 5.1 函数库、链接和载入
- C Expert Programming Chapter 4 The Shocking Fact: Arrays and pointers are not the same 4.2 Why does my code not work
- 触觉智能分享-SSD20X实现升级显示进度条
- Performance testing with Loadrunner
- el-Select selector bottom fixed
猜你喜欢

转:管理是对可能性的热爱,管理者要有闯进未知的勇气

Turn: Management is the love of possibility, and managers must have the courage to break into the unknown

Typora 使用保姆级教程 | 看这一篇就够了 | 历史版本已被禁用

day13--postman interface test

编程大杂烩(三)

触觉智能分享-SSD20X实现升级显示进度条

【C语言进阶】程序环境和预处理

el-Select selector bottom fixed

附加:对于“与数据表对应的实体类“,【面对MongoDB时,使用的@Id等注解】和【以前面对MySQL时,使用的@Id等注解】,是不同的;

看DevExpress丰富图表样式,如何为基金公司业务创新赋能
随机推荐
21 days learning challenge 】 【 sequential search
注意!软件供应链安全挑战持续升级
一个对象引用的思考
C专家编程 第4章 令人震惊的事实:数组和指针并不相同 4.3 什么是声明,什么是定义
System design. How to design a spike system (full version transfer)
The 2022 PMP exam has been delayed, should we be happy or worried?
想低成本保障软件安全?5大安全任务值得考虑
结构体指针知识要点总结
你以为border-radius只是圆角吗?【各种角度】
Converts XML tags to TXT format (voc conversion for yolo convenient training)
入坑软件测试的经验与建议
Gartner 权威预测未来4年网络安全的8大发展趋势
OpenSSF 安全计划:SBOM 将驱动软件供应链安全
Plus版SBOM:流水线物料清单PBOM
day13--postman接口测试
Landing, the IFC, GFC, FFC concept, layout rules, forming method, use is analysed
There is an 8 hour difference between the docker installation of mysql and the host.
Dynamic programming of the division of numbers
C Expert Programming Chapter 4 The Shocking Fact: Arrays and pointers are not the same 4.1 Arrays are not pointers
What are the steps for how to develop a mall system APP?