在Windows上'npm install'非常慢 [英] 'npm install' extremely slow on Windows

查看:462
本文介绍了在Windows上'npm install'非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对我来说, 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屋!

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