当前位置:网站首页>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/
然后重新安装依赖就可以了
边栏推荐
- C专家编程 第5章 对链接的思考 5.1 函数库、链接和载入
- 【一步到位】Jenkins的安装、部署、启动(完整教程)
- C Expert Programming Chapter 5 Thinking about Chaining 5.6 Take it easy --- see who's talking: take the Turning quiz
- How to keep the source code confidential in the development under the burning scenario
- Converts XML tags to TXT format (voc conversion for yolo convenient training)
- Do you think border-radius is just rounded corners?【Various angles】
- Plus版SBOM:流水线物料清单PBOM
- C Expert Programming Chapter 4 The Shocking Fact: Arrays and Pointers Are Not the Same 4.3 What is a Declaration and What is a Definition
- 编程大杂烩(四)
- 擎朗智能全国研发创新中心落地光谷:去年曾获2亿美元融资
猜你喜欢

Simple operation of the file system

Tactile intelligent sharing - SSD20X realizes upgrade display progress bar

败给“MySQL”的第60天,我重振旗鼓,四面拿下蚂蚁金服offer
![[Evaluation model] Topsis method (pros and cons distance method)](/img/e7/c24241faced567f3e93f6ff3f20074.png)
[Evaluation model] Topsis method (pros and cons distance method)

There is an 8 hour difference between the docker installation of mysql and the host.

Shocked, 99.9% of the students didn't really understand the immutability of strings

word 公式编辑器 键入技巧 | 写数学作业必备速查表

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

The symbol table

System design. How to design a spike system (full version transfer)
随机推荐
[Evaluation model] Topsis method (pros and cons distance method)
2022年PMP考试延迟了,该喜该忧?
DataTable使用Linq进行分组汇总,将Linq结果集转化为DataTable
力扣题解8/3
Towards Real-Time Multi-Object Tracking(JDE)
Mini program + e-commerce, fun new retail
The difference between px, em, and rem
注意!软件供应链安全挑战持续升级
word 公式编辑器 键入技巧 | 写数学作业必备速查表
某母婴小程序加密参数解密
C Expert Programming Chapter 5 Thinking about Linking 5.1 Libraries, Linking and Loading
C Expert Programming Chapter 5 Thinking about Linking 5.3 5 Special Secrets of Library Linking
How to simplify the automation of modern e-procurement?
Tactile intelligent sharing - SSD20X realizes upgrade display progress bar
7-2 LVS+DR Overview and Deployment
高性能高可靠性高扩展性分布式防火墙架构
mysql index notes
[21 Days Learning Challenge] Image rotation problem (two-dimensional array)
离线采集怎么看sql执行计划
备份工具pg_dump的使用《postgres》