没有 ssl 的 npm 安装 [英] npm install without ssl

查看:18
本文介绍了没有 ssl 的 npm 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Ubuntu 虚拟机,无法通过 ssl(即 https)连接到站点.如果 url 以 http 开头,它可以成功地从互联网上下载工件.

I have an Ubuntu VM that is having trouble connecting to sites with ssl, i.e. https. It can successfully download artifacts from the internet if the url begins with http.

npm install 将通过 https 下载依赖项.有没有办法通过http下载?

npm install will download dependencies via https. Is there anyway make it download via http?

推荐答案

尝试使用命令将注册表更改为 http 版本,而不是默认的 https 版本

Try changing the registry to the http version rather that the default https one using the command

npm config set registry http://registry.npmjs.org/

这篇关于没有 ssl 的 npm 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆