当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
编程Go:内置打印函数 print、println 和 fmt 包中 fmt.Print、fmt.Println 的区别
IP地址查询
Unity行为树AI分享
flink on yarn任务迁移
页面刷新没有执行watch?
Code Refactoring: For Unit Testing
flink-sql大量使用案例
Oracle备份脚本
JS原型链
关系型数据库-MySQL:错误日志(log_error)
EPSON RC+ 7.0 使用记录一
实际开发中左菜单自定义图标点击切换
Unity动画生成工具
攻防世界MISC—MISCall
7.15 Day21---MySQL----Index
原型对象及原型链的理解
大龄程序员的心理建设
[原创]STL容器map和unordered_map性能,创建,插入,随机访问速度对比!
二月、三月校招面试复盘总结(一)
Lombok的一些使用心得









