当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
使用express-jwt第三方包报错TypeError: expressJWT is not a function
flink-sql自定义函数
flink-sql所有表格式format
纳米级完全删除MYSQL5.7以及一些吐槽
关于 for in与for of 的差别以及如何使用
编程Go:内置打印函数 print、println 和 fmt 包中 fmt.Print、fmt.Println 的区别
编程Go:学习目录
数据库根据提纲复习
登录页面js手写
原型对象及原型链的理解
flink on yarn指定第三方jar包
解决JDBC在web工程中无法获取配置文件
Deploy LVS-DR cluster [experimental]
Shell(3)条件控制语句
自动化运维工具Ansible(5)流程控制
自己学习爬虫写的基础小函数
什么是跨域和同源
Kubernetes基本入门-集群资源(二)
进入古诗文网站个人中心,绕过登录
Set集合与Map集合