npm 卡在 fetchMetadata 上 ->网络 [英] npm gets stuck on fetchMetadata -> network

查看:279
本文介绍了npm 卡在 fetchMetadata 上 ->网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 npm 经常卡住,无论是从 package.json 安装 npm 还是单个包.

My npm is getting stuck a lot, whether its npm install from package.json or individual packages.

现在,我什至无法sudo npm install node-inspector -g

我在 ubuntu 16.04

npm cache clear 没有帮助.安装需要数小时或失败.

npm cache clear didn't help. The installation takes hours or fails.

推荐答案

如果您使用代理,请检查是否存在任何问题.您也可以尝试手动设置 npm 的端点:

Check if there any issues with proxies if you using any. You can try also to set npm's endpoint manually:

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

这篇关于npm 卡在 fetchMetadata 上 ->网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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