当前位置:网站首页>npm install dependency error npm ERR! code ENOTFOUNDnpm ERR! syscall getaddrinfonpm ERR! errno ENOTFOUND
npm install dependency error npm ERR! code ENOTFOUNDnpm ERR! syscall getaddrinfonpm ERR! errno ENOTFOUND
2022-08-04 05:54:00 【S XiaoxiaoS Four-dimensional Smile】
npm ERR! code ENOTFOUNDnpm ERR! syscall getaddrinfonpm ERR! errno ENOTFOUNDnpm ERR! network request to http://registry.cnpmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz failed, reason: getaddrinfo ENOTFOUND registry.cnpmjs.orgnpm 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! networknpm ERR! network If you are behind a proxy, please make sure that thenpm ERR! network 'proxy' config is set properly. See: 'npm help config'
According to the online search solution:
1. Execute:npm config get proxynpm config get https-proxyIf the return value is not null, continue execution:(This step is very important. Be sure to ensure that the return values of both commands are null. Then again, this error should occur. These two return values are not null)npm config set proxy nullnpm config set https-proxy null2. Execute:npm config set registry https://registry.cnpmjs.org/
I tried mine but it didn't work, and then I searched for other methods:
Directly modify the npmrc file, which is the location of the npm configuration file.
Because it is a hidden file, you can directly search for the file
Open and modify the file:
http-proxy=http://proxyhost/:proxyportstrict-ssl=falseregistry=https://registry.npmjs.org/
Then install the dependencies again
边栏推荐
猜你喜欢
随机推荐
NFT市场可二开开源系统
CAS与自旋锁、ABA问题
flink sql left join数据倾斜问题解决
页面刷新没有执行watch?
关于事件捕获和事件冒泡的顺序,以及如何处理事件冒泡带来的影响
自动化运维工具Ansible(2)ad-hoc
Camera2 闪光灯梳理
记录获取参赛选手信息过程
【树 图 科 技 头 条】2022年6月28日 星期二 伊能静做客树图社区
ISCC2021———MISC部分复现(练武)
flink-sql所有表连接器
EPSON RC+ 7.0 使用记录一
Unity Visual Effect Graph入门与实践
ReentrantLock(公平锁、非公平锁)可重入锁原理
攻防世界MISC—MISCall
【Matlab仿真】:一带电量为q的电荷以速度v运动,求运动电荷产生磁感应强度
实现登录密码混合动态因子,且动态因子隐式
原型对象及原型链的理解
编程Go:内置打印函数 print、println 和 fmt 包中 fmt.Print、fmt.Println 的区别
ORACLE LINUX 6.5 安装重启后Kernel panic - not syncing : Fatal exception