在Windows上'npm install'非常慢 [英] 'npm install' extremely slow on Windows
问题描述
对我来说, npm安装
非常慢。我正在使用Windows 8.1和最新的npm版本。我的连接速度约为100Mbit / s。
For me is npm install
extremely slow. I'm using Windows 8.1 with the latest npm version. My connection speed is around 100Mbit/s.
我要安装的项目大约有20个软件包/依赖项,安装所有依赖项大约需要30分钟。 。
The project I'm trying to install has around 20 packages/dependencies and it takes around 30 Minutes to install all dependencies ...
有人知道吗?
推荐答案
我遇到了同样的问题,使用peterh提到的-verbose
向我展示了问题的根源:我在代理后面,该代理使用自己的证书进行https连接。
根据用户 Mletter1在 https://github.com/npm/npm/ issue / 8872 使用http:
I ran into the same problem, using --verbose
as peterh mentioned showed me the source of the problem: I am behind a proxy, which uses its own certificates for https-connections.
According to user "Mletter1" on https://github.com/npm/npm/issues/8872 the issue is quite easily solved by using http:
npm config set registry http://registry.npmjs.org/ --global
瞧瞧,它又快了。当然,如果您可以通过网络以明文形式显示npm信息,则只应这样做;-)
And voilà, it's fast again. Of course you should only do this, if you're ok with cleartext npm infos over the net ;-)
这篇关于在Windows上'npm install'非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!