当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
IvNWJVPMLt
IP地址查询
自动化运维工具Ansible(4)变量
NFT市场可二开开源系统
ISCC-2022
通过&修改数组中的值
8.30难题留坑:计数器问题和素数等差数列问题
使用express-jwt第三方包报错TypeError: expressJWT is not a function
thymeleaf中onclick事件动态传递参数问题
攻防世界MISC—MISCall
记录获取参赛选手信息过程
关于 for in与for of 的差别以及如何使用
Unity行为树AI分享
显式调用类的构造函数(而不是用赋值构造),实现一个new操作
CAS与自旋锁、ABA问题
Oracle备份脚本
es6 学习记录
对象存储-分布式文件系统-MinIO-3:MinIo Client(mc)
自动化运维工具Ansible(7)roles
flink-sql查询配置与性能优化参数详解









