“npm install"在 Windows 上非常慢 [英] 'npm install' extremely slow on Windows
问题描述
对我来说 npm install
非常慢.我正在使用带有最新 npm 版本的 Windows 8.1.我的连接速度大约是 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 ...
有人知道吗?
推荐答案
我遇到了同样的问题,使用 --verbose
as peterh 提到的向我展示了问题的根源:我落后于代理,它使用自己的证书进行 https 连接.根据用户Mletter1"在 https://github.com/npm/npm/issues/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 ;-)
这篇关于“npm install"在 Windows 上非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!