npm挂起时试图安装吞咽 [英] npm hangs while trying to install gulp

查看:184
本文介绍了npm挂起时试图安装吞咽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:



当我尝试使用'npm install'或任何变体安装任何软件包时:

  npm install gulp -g -verbose 

npm install gulp -verbose

npm install gulp

npm install

npm install connect

I获得以下输出,但它只是挂在最后一行,永远不会完成安装:

  npm信息如果以ok 
npm verb cli ['C:\\ Program Files \\\\
odejs\\\\\\
ode.exe',
npm verb cli'C:\\ Program Files \\\\
odejs\\\\
ode_modules\\\\
pm\\\\\\\\\\\\\\\\'\\\\\\\\\\'\\\\\\\\\ cli'gulp',
npm verb cli'-g',
npm verb cli'-verbose']
npm info using npm@2.5.1
npm info using node @ v0.12.0
npm动词节点符号链接C:\程序文件\节点\\
ode.exe
NPM动词缓存添加规格一饮而尽
NPM动词addNamed一饮而尽@ *
NPM动词addNameRange注册表:HTTPS://registry.npmjs.org/gulp不是在飞行中;获取
npm动词请求uri https://registry.npmjs.org/gulp
npm动词请求不需要授权
npm信息尝试注册请求尝试#1 at 4:09:05 PM
npm动词请求ID 77dfc5813704dba8
npm动词etagEOZJDNUCAN683DXC55T2W1JVT
npm http请求GET https://registry.npmjs.org/gulp
npm http 304 https://注册表。 npmjs.org/gulp
npm verb etag https://registry.npmjs.org/gulp from cache
npm动词将储存吞吐量提供给C:\Users\iwiegand.TMI\AppData\漫游\\\
pm-cache\registry.npmjs.org\gulp\
.cache.json
npm动词addNamed gulp@3.8.11
npm动词addRemoteTarball https://注册表.npmjs.org / gulp / - / gulp-3.8.11.tgz不在飞行中;加入
NPM动词addRemoteTarball [ 'https://registry.npmjs.org/gulp/-/gulp-3.8.11.tgz',
NPM动词addRemoteTarball 'd557e0a7283eb4136491969b0497767972f1d28a']
^ CTerminate批次作业(是/否)?

绝对不是https,因为将它改为http可以得到相同的结果。它可以从我机器上的任何文件夹执行此操作,无论使用什么软件包,甚至只需要'npm install'。我已重新启动,res.all node.js等我在Windows 8.1机器上,并希望我有一台Mac。



疯狂的事情是它已经工作。我得到了作曲家,Laravel和一些其他的东西安装得很好,然后有一天,它开始这样做。我不知道什么可能会干扰。检查TaskManager,npm IS以18%的CPU使用率运行,一直在试图安装。



显然,我是地球上唯一有这个问题的人。我在Google上搜索并搜索过,没有任何结果。我正在诉诸Facebook和Google团体。到目前为止,没有任何来自SO用户的建议对我有所帮助,尽管我非常赞赏这些尝试。

解决方案

我最近遇到了这个问题,通过纠正我的 TEMP 环境变量,通过其他安装程序或npm软件包来修正它,我至少在自己的机器上修复它。我在github上发现了一个问题,它描述了完全相同的问题,我在那里发布了我的发现和解决方案
$ b

基本上,有人在<$ code>; C:\ Python27 c $ c> TEMP 这是搞砸了npm模块的开箱。所以,也许这是一个很长的一步,但检查出来,看看它是否适合你!


UPDATED:

When I try to install any package with 'npm install', or any variant:

npm install gulp -g -verbose

npm install gulp -verbose

npm install gulp

npm install

npm install connect

I get the following output but it just hangs on the last line, never finishing the install:

npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
npm verb cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'install',
npm verb cli   'gulp',
npm verb cli   '-g',
npm verb cli   '-verbose' ]
npm info using npm@2.5.1
npm info using node@v0.12.0
npm verb node symlink C:\Program Files\nodejs\\node.exe
npm verb cache add spec gulp
npm verb addNamed gulp@*
npm verb addNameRange registry:https://registry.npmjs.org/gulp not in flight; fetching
npm verb request uri https://registry.npmjs.org/gulp
npm verb request no auth needed
npm info attempt registry request try #1 at 4:09:05 PM
npm verb request id 77dfc5813704dba8
npm verb etag "EOZJDNUCAN683DXC55T2W1JVT"
npm http request GET https://registry.npmjs.org/gulp
npm http 304 https://registry.npmjs.org/gulp
npm verb etag https://registry.npmjs.org/gulp from cache
npm verb get saving gulp to C:\Users\iwiegand.TMI\AppData\Roaming\npm-cache\registry.npmjs.org\gulp\
.cache.json
npm verb addNamed gulp@3.8.11
npm verb addRemoteTarball https://registry.npmjs.org/gulp/-/gulp-3.8.11.tgz not in flight; adding
npm verb addRemoteTarball [ 'https://registry.npmjs.org/gulp/-/gulp-3.8.11.tgz',
npm verb addRemoteTarball   'd557e0a7283eb4136491969b0497767972f1d28a' ]
^CTerminate batch job (Y/N)?

It's definitely not https, since changing it to http yields the same result. It does this from any folder on my machine, no matter what package, or even just 'npm install'. I've restarted, resintalled node.js, etc. I'm on a Windows 8.1 machine and wishing I had a Mac.

The crazy thing is it HAS worked. I got Composer, Laravel and a bunch of other stuff installed just fine, then one day, it just started doing this. I have no idea what could be interfering. Checking the TaskManager, npm IS running with like 18% CPU usage the whole time it's "trying" to install.

Apparently I'm the only one on Earth with this problem. I've searched and searched on Google and nothing. I'm resorting to Facebook and Google groups. So far no suggestions from SO users have helped, although I very much appreciate the attempts.

解决方案

I recently came across this problem and managed to fix it, on my own machine at least, by correcting my TEMP environment variable that had been mucked with by some other installer or npm package. I found an issue on github that was describing the exact same problem and I posted my discovery and resolution there.

Basically, someone had appended ;C:\Python27 to the end of my TEMP which was screwing up the unpacking of the npm module. So, maybe it's a long shot, but check it out and see if it works for you!

这篇关于npm挂起时试图安装吞咽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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