npm报错 443(error : getaddrinfo enotfound registry.npmjs.org registry.npmjs.org:443)
为npm设置代理服务器
由于公司网络为局域网。使用Node,需要通过代理来使用npm命令来为node.js安装所需的程序包。
1、首先看操作系统的环境变量:
HTTPS_PROXY / https_proxy / HTTP_PROXY / http_proxy
注意其中带s和不带s的区别,以及大小写的区别。如果有了这些操作系统的环境变量,npm会自动使用的,或者是说默认值。
2、如果没有设置环境变量,npm的可以有几个配置选项来配置代理服务器:
npm config set <key> <value> 设置config变量
npm config get <key> 获取config变量
npm config delete <key> 删除config变量
npm config list 查看config
npm config ls -l 查看全部config
对于设置代理服务器大概有以下两个配置选项:proxy和https_proxy,这两个选项一般只要设置proxy这个选项就可以了
除非https的代理服务器与你的http协议的代理服务器不同,需要设置两个代理服务器。
3、设置命令:
npm config set proxy=http://[user]:[password]@[proxy_host]:[proxy_port]npm config set https_proxy=http://[user]:[password]@[proxy_host]:[proxy_port]
其中的user和password如果代理服务器不要求则是非必选项,不带user/password话@字符也要去掉
4、不使用局域网时删除proxy和https_proxy
npm config delete proxynom config delete https_proxy
npm报错 443(error : getaddrinfo enotfound registry.npmjs.org registry.npmjs.org:443)相关推荐
- swagger请求报错:error:getaddrinfo ENOTFOUND
swagger请求报错:error:getaddrinfo ENOTFOUND 这个是我遇到的问题,可能每个人遇到的方式不一样,我只说我遇到的问题以及我的解决办法. 我的这个是因为我新建了一个数据表, ...
- nuxt启动报错: Error: getaddrinfo ENOTFOUND 0
nuxt 项目启动,执行npm run dev 报错 Error: getaddrinfo ENOTFOUND 0 原因: nuxt.config.js 中 serve 配置项 host,把 '0' ...
- Yarn 报错:error Couldn‘t publish package: “https://registry.yarnpkg.com/ 。。。Forbidden“
Yarn 报错:error Couldn't publish package: "https://registry.yarnpkg.com/generator-alison-vue: For ...
- Yarn报错:error Couldn‘t publish package: “https://registry。。。 Are you logged in as the correct user?“
Yarn报错:error Couldn't publish package: "https://registry.yarnpkg.com/generator-vue: You do not ...
- npm报错stack Error: EACCES: permission denied, mkdir
目录 一.问题描述 二.解决方法 一.问题描述 执行 npm 报错:stack Error: EACCES: permission denied, mkdir npm install webpack ...
- npm报错:Error: EPERM: operation not permitted, uv_cwd
## 处理方案 所在文件夹的目录权限不够. 处理:终端的默认打开地址, 进行操作. 分析: 可能命令没有全局进行安装.
- Postman报错:Error: NETERR: getaddrinfo ENOTFOUND localhost
一.报错描述 我这里使用postman新建了一个Monitors,但是在运行的时候报错了 由于新建的时候使用了邮箱,所以邮箱也收到了报错提示 重点是:Error: NETERR: getaddri ...
- npm cb() never called!和 Error: getaddrinfo ENOTFOUND registry.npmjs.com registry.npmjs.com:443
我在服务器上执行 npm i 时竟然出错了,下面是错误的提示: npm ERR! cb() never called!npm ERR! This is an error with npm itself ...
- yarn报错:error An unexpected error occurred: “https://registry.yarnpkg.com/-/user/org.couchdb。。。
Yarn 报错:error An unexpected error occurred: "https://registry.yarnpkg.com/-/user/org.couchdb.us ...
- npm 报错:`[HPM] Error occurred while trying to proxy request (ECONNREFUSED)`
npm 报错:[HPM] Error occurred while trying to proxy request /users from localhost:8000 to https://loca ...
最新文章
- [转]numpy性能优化
- [19/04/07-星期日] 多线程_线程的状态(新生、就绪、运行、死亡)
- QML基础类型之geoshape
- condition的作用
- JQuery中button提交表单报TypeError: elem[type] is not a function jquery
- bootstrap java web_Java web MVC(jsp,servlet,dao)+Bootstrap购物网站开发经验总结 (持续更新)...
- python语言-Python语言的特点有哪些?
- font-awesome在Vue项目中的使用(npm使用)
- 常用的NoSQL数据库
- Extendsim 系统仿真的强大工具,多方法论模拟--介绍和试用
- jdk32位安装包下载_天正T20V5.0软件安装包下载(建筑,给排水,结构,电气,暖通)+安装教程...
- EVE 设备开机时的更改连线
- 每日一犬 · 波尔多犬
- ZUCC_大数据计算技术_实验三 HDFS编程实践
- 木棍上的蚂蚁jolj2466 模拟法
- 2019房企变局:周期轮回,“踏雪寻梅”
- nginx反向代理地址是域名时请求不通的情况
- 浅谈LED和OLED技术区别
- react组件中的constructor和super小知识
- springboot(JavaCV )实现视频截取第N帧并保存图片