This repository has been archived by the owner. It is now read-only.

NPM will not install any packages, hangs on 'addRemoteTarball' #7590

Closed
sinrise opened this Issue Mar 10, 2015 · 16 comments

Comments

Projects
None yet
@sinrise

sinrise commented Mar 10, 2015

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.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Mar 11, 2015

i have same problem plz help :(

ghost commented Mar 11, 2015

i have same problem plz help :(

@vladop

This comment has been minimized.

Show comment
Hide comment
@vladop

vladop Mar 23, 2015

Same problem here.

vladop commented Mar 23, 2015

Same problem here.

@sinrise

This comment has been minimized.

Show comment
Hide comment
@sinrise

sinrise Mar 23, 2015

I'm not sure if this is related. When I run npm install from bash, it creates a folder off my c: drive: C:\c\Users[myusername]\AppData\Local. That 'c' after the drive letter is not a typo, and [myusername] is my actual username. It creates that 'c' folder. The 'Local' folder is completely empty. It doesn't do it if I run it from the standard Windows Command Prompt OR from my console emulator (cmder).

sinrise commented Mar 23, 2015

I'm not sure if this is related. When I run npm install from bash, it creates a folder off my c: drive: C:\c\Users[myusername]\AppData\Local. That 'c' after the drive letter is not a typo, and [myusername] is my actual username. It creates that 'c' folder. The 'Local' folder is completely empty. It doesn't do it if I run it from the standard Windows Command Prompt OR from my console emulator (cmder).

@mfundo

This comment has been minimized.

Show comment
Hide comment
@mfundo

mfundo Mar 27, 2015

Happens to be a problem with the new version of node or npm, didnt really debug it further but rolling back to a previous version sorts it out, know its not a solution but at least you can continue to work and install your stuff.

mfundo commented Mar 27, 2015

Happens to be a problem with the new version of node or npm, didnt really debug it further but rolling back to a previous version sorts it out, know its not a solution but at least you can continue to work and install your stuff.

@smikes

This comment has been minimized.

Show comment
Hide comment
@smikes

smikes May 3, 2015

Contributor

Is this still a problem for you?

Could you please upload your npm-debug.log as a gist http://gist.github.com? If possible, run npm with at least one -d flag to increase the logging level.

There have been a lot of improvements to npm -- especially involving git dependencies -- since 2.7. Can you try updating your npm installation?

There is a bad interaction between two known bugs — one in node@>0.11 and iojs and the other in npm@<2.8.2. This can cause ECONNRESET and ETIMEDOUT errors. The full writeup is here: #7699 You can fix this problem by updating your npm to the latest (see below).

To update npm on Windows, follow the instructions here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and open a new issue!)

Thanks!

Contributor

smikes commented May 3, 2015

Is this still a problem for you?

Could you please upload your npm-debug.log as a gist http://gist.github.com? If possible, run npm with at least one -d flag to increase the logging level.

There have been a lot of improvements to npm -- especially involving git dependencies -- since 2.7. Can you try updating your npm installation?

There is a bad interaction between two known bugs — one in node@>0.11 and iojs and the other in npm@<2.8.2. This can cause ECONNRESET and ETIMEDOUT errors. The full writeup is here: #7699 You can fix this problem by updating your npm to the latest (see below).

To update npm on Windows, follow the instructions here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and open a new issue!)

Thanks!

@vladop

This comment has been minimized.

Show comment
Hide comment
@vladop

vladop May 3, 2015

I somehow find out that problem is because I have to temp variables defined, I deleted one and now everything works.

vladop commented May 3, 2015

I somehow find out that problem is because I have to temp variables defined, I deleted one and now everything works.

@philsco

This comment has been minimized.

Show comment
Hide comment
@philsco

philsco May 5, 2015

Took me a while to figure out what @Imperat0r was referring to, after trying EVERY single option listed in the instructions.....
I ran:
npm config ls -l

and indeed had two 'tmp' folder paths (the result of a faulty entry in the Win 8.1 Environment Variables control panel).

Just thought I'd post it here since I wasted a whole day on the issue....

philsco commented May 5, 2015

Took me a while to figure out what @Imperat0r was referring to, after trying EVERY single option listed in the instructions.....
I ran:
npm config ls -l

and indeed had two 'tmp' folder paths (the result of a faulty entry in the Win 8.1 Environment Variables control panel).

Just thought I'd post it here since I wasted a whole day on the issue....

@othiym23

This comment has been minimized.

Show comment
Hide comment
@othiym23

othiym23 May 20, 2015

Contributor

Closing as resolved.

Contributor

othiym23 commented May 20, 2015

Closing as resolved.

@othiym23 othiym23 closed this May 20, 2015

@acoatsCalicosol

This comment has been minimized.

Show comment
Hide comment
@acoatsCalicosol

acoatsCalicosol Dec 6, 2015

philsco - I had the same problem too. Changing the TEMP environment variable fixed it.

acoatsCalicosol commented Dec 6, 2015

philsco - I had the same problem too. Changing the TEMP environment variable fixed it.

@PyroSA

This comment has been minimized.

Show comment
Hide comment
@PyroSA

PyroSA Mar 2, 2016

Had a similar one on a colleagues's machine.
TEMP was set to two folders separated with a semi-colon for some reason.

PyroSA commented Mar 2, 2016

Had a similar one on a colleagues's machine.
TEMP was set to two folders separated with a semi-colon for some reason.

@akshat-reglobe

This comment has been minimized.

Show comment
Hide comment
@akshat-reglobe

akshat-reglobe May 2, 2016

This issue is still not resolved . I also faced the same issue in Windows 10. Thanks for the temporary solution , urge Node Developers to find solution.

akshat-reglobe commented May 2, 2016

This issue is still not resolved . I also faced the same issue in Windows 10. Thanks for the temporary solution , urge Node Developers to find solution.

@korneliuskristianr

This comment has been minimized.

Show comment
Hide comment
@korneliuskristianr

korneliuskristianr Jul 12, 2016

Hi, thanks it works.
I use windows 10-64bit. The problem is because there is 2 TEMP path on windows environment

korneliuskristianr commented Jul 12, 2016

Hi, thanks it works.
I use windows 10-64bit. The problem is because there is 2 TEMP path on windows environment

@jessisharon13

This comment has been minimized.

Show comment
Hide comment
@jessisharon13

jessisharon13 Feb 2, 2017

Thank you!
Every time I tried to 'npm install', it would get stuck on loadAllDepsIntoIdealTree and never finish. Fixing the Temp environment variable fixed it.

jessisharon13 commented Feb 2, 2017

Thank you!
Every time I tried to 'npm install', it would get stuck on loadAllDepsIntoIdealTree and never finish. Fixing the Temp environment variable fixed it.

@ajibs

This comment has been minimized.

Show comment
Hide comment
@ajibs

ajibs May 20, 2017

I also had two TEMP variables defined in my USER Environment variables, and I had to delete one of the variables for my "npm install" to start working.

Although, earlier I had changed the TEMP variable in my SYSTEM Environment variables to C:\tmp, after creating a new "tmp" folder in my C drive.

The above action was based on these posts: http://stackoverflow.com/questions/40874237/npm-install-hangs-on-loadrequesteddeps and #10462

This issue drove me crazy for about a day before I found these solutions.
I was so glad when I found it. Many thanks to you all.

ajibs commented May 20, 2017

I also had two TEMP variables defined in my USER Environment variables, and I had to delete one of the variables for my "npm install" to start working.

Although, earlier I had changed the TEMP variable in my SYSTEM Environment variables to C:\tmp, after creating a new "tmp" folder in my C drive.

The above action was based on these posts: http://stackoverflow.com/questions/40874237/npm-install-hangs-on-loadrequesteddeps and #10462

This issue drove me crazy for about a day before I found these solutions.
I was so glad when I found it. Many thanks to you all.

@Khadijasaleem4

This comment has been minimized.

Show comment
Hide comment
@Khadijasaleem4

Khadijasaleem4 Jun 11, 2017

@ajibs my Environment variables looks like this.
2

I changed TEMP = c:\tmp and created folder name tmp in C:\ but still its not working :(

Khadijasaleem4 commented Jun 11, 2017

@ajibs my Environment variables looks like this.
2

I changed TEMP = c:\tmp and created folder name tmp in C:\ but still its not working :(

@ajibs

This comment has been minimized.

Show comment
Hide comment
@ajibs

ajibs Jun 11, 2017

Try moving the "npm path" in the USER VARIABLES to the bottom of the list i.e. below all the other paths like ruby and co

ajibs commented Jun 11, 2017

Try moving the "npm path" in the USER VARIABLES to the bottom of the list i.e. below all the other paths like ruby and co

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.