npm 安装挂起 [英] npm install hangs
本文介绍了npm 安装挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的package.json
:
{
"name": "my-example-app",
"version": "0.1.0",
"dependencies": {
"request": "*",
"nano": "3.3.x",
"async": "~0.2"
}
}
现在,当我打开 cmd 并运行 npm install
时,安装挂起.我做错了什么?
Now, when I open the cmd and run npm install
, the install hangs. What am I doing wrong?
推荐答案
我遇到了同样的问题.原因 - 配置了错误的代理,因此 npm 无法下载包.
I had the same problem. The reason - wrong proxy was configured and because of that npm was unable to download packages.
所以你最好的办法是查看
So your best bet is to the see the output of
$ npm install --verbose
并找出问题所在.如果您从未配置过代理,那么可能的原因可能是
and identify the problem. If you have never configured proxy, then possible causes can be
- 非常过时的 npm 版本.
- 您的互联网连接出现问题.
- 权限不足以让 npm 修改文件.
这篇关于npm 安装挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文