如何清除NPM之前的ssl代理设置? 嗯,我搜索了很多,但我得到的所有帖子主要是关于如何在公司网络中设置代理。

我试图设置代理为空:

npm config set http-proxy
npm config set https-proxy

第一个命令传递,第二个命令警告说:

npm WARN invalid config proxy=""
npm WARN invalid config Must be a full url with 'http://'

警告是否可忽略,我是否已成功清除代理设置?


当前回答

在默认值下,npm从https://registry.npmjs.org寻找包。您还需要重写注册表和严格ssl值。

npm config set registry "http://registry.npmjs.org"
npm config set strict-ssl false

其他回答

尝试用以下方法删除它们:

npm config delete proxy
npm config delete https-proxy

我曾经遇到过同样的问题。 按照以下步骤删除代理值: 1.在npm中删除代理: (-g很重要) NPM配置删除代理 NPM删除http-proxy NPM配置删除http -proxy 使用以下命令检查npm配置文件: NPM配置列表

2.删除系统代理。 设置HTTP_PROXY = null 设置HTTPS_PROXY = null

现在关闭命令行并打开它以刷新变量(代理)。

我使用

npm config set proxy null
npm config set https-proxy null

这对我很有效。

致以最亲切的问候

请参阅文件C:\Users\myusers.中的npm设置npmrc文件。有时npm代理配置设置不适用。所以值得一查。

我认为不是http-proxy,而是proxy:

npm config set proxy="http://yourproxyhere"