Skip to content
This repository has been archived by the owner on Dec 24, 2018. It is now read-only.

nvmw install fails on first attempt with "Can't get npm" error. #45

Open
jamesshore opened this issue Mar 6, 2015 · 7 comments
Open

Comments

@jamesshore
Copy link

When I run nvmw install, it fails the first time with a "Can't get npm" error. If I run the command again, it works. Windows 7 SP1.

Example 1:

c:\projects\weewikipaint>nvmw install 0.8.10
Start installing node/v0.8.10 (x32) to C:\Users\Jim\.nvmw\v0.8.10
Download from https://nodejs.org/dist/v0.8.10/node.exe, and save it as C:\Users\
Jim\.nvmw\v0.8.10\node.exe
Done
Start install npm
Download file from https://raw.githubusercontent.com/joyent/node/v0.8.10/deps/np
m/package.json
package.json
Content length is 2.66kb
Download 100%, 2.66kb / 2.66kb, 177.08kb/s ...
Donwload done
Download file from https://github.com/npm/npm/archive/v1.1.62.zip
v1.1.62.zip
Redirect: https://codeload.github.com/npm/npm/zip/v1.1.62
Download file from https://codeload.github.com/npm/npm/zip/v1.1.62
v1.1.62
Can't get 'content-length'
Can't get npm: https://github.com/npm/npm/archive/v1.1.62.zip

c:\projects\weewikipaint>nvmw install 0.8.10
Start installing node/v0.8.10 (x32) to C:\Users\Jim\.nvmw\v0.8.10
Download from https://nodejs.org/dist/v0.8.10/node.exe, and save it as C:\Users\
Jim\.nvmw\v0.8.10\node.exe
Done
Start install npm
Download file from https://raw.githubusercontent.com/joyent/node/v0.8.10/deps/np
m/package.json
package.json
Content length is 2.66kb
Download 100%, 2.66kb / 2.66kb, 2.59mb/s ...
Donwload done
Download file from https://github.com/npm/npm/archive/v1.1.62.zip
v1.1.62.zip
Redirect: https://codeload.github.com/npm/npm/zip/v1.1.62
Download file from https://codeload.github.com/npm/npm/zip/v1.1.62
v1.1.62
Content length is 1.75mb
Download 100%, 1.75mb / 1.75mb, 1.63mb/s ...
Donwload done
Download npm 1.1.62 is done
Start unzip "C:\Users\Jim\.nvmw\v0.8.10\npm.zip" to "C:\Users\Jim\.nvmw\v0.8.10"

The system cannot find the file specified.
C:\Users\Jim\.nvmw\v0.8.10\npm-1.1.62
        1 dir(s) moved.
        1 file(s) copied.
C:\Users\Jim\.nvmw\v0.8.10
npm install ok
Finished
Now using node v0.8.10 x32

c:\projects\weewikipaint>node --version
v0.8.10

Example 2:

c:\projects\weewikipaint>nvmw install 0.12.0
Start installing node/v0.12.0 (x32) to C:\Users\Jim\.nvmw\v0.12.0
Download from https://nodejs.org/dist/v0.12.0/node.exe, and save it as C:\Users\
Jim\.nvmw\v0.12.0\node.exe
Done
Start install npm
Download file from https://raw.githubusercontent.com/joyent/node/v0.12.0/deps/np
m/package.json
package.json
Content length is 4.32kb
Download 100%, 4.32kb / 4.32kb, 4.22mb/s ...
Donwload done
Download file from https://github.com/npm/npm/archive/v2.5.1.zip
v2.5.1.zip
Redirect: https://codeload.github.com/npm/npm/zip/v2.5.1
Download file from https://codeload.github.com/npm/npm/zip/v2.5.1
v2.5.1
Can't get 'content-length'
Can't get npm: https://github.com/npm/npm/archive/v2.5.1.zip

c:\projects\weewikipaint>node --version
v0.8.10

c:\projects\weewikipaint>nvmw install 0.12.0
Start installing node/v0.12.0 (x32) to C:\Users\Jim\.nvmw\v0.12.0
Download from https://nodejs.org/dist/v0.12.0/node.exe, and save it as C:\Users\
Jim\.nvmw\v0.12.0\node.exe
Done
Start install npm
Download file from https://raw.githubusercontent.com/joyent/node/v0.12.0/deps/np
m/package.json
package.json
Content length is 4.32kb
Download 100%, 4.32kb / 4.32kb, 287.83kb/s ...
Donwload done
Download file from https://github.com/npm/npm/archive/v2.5.1.zip
v2.5.1.zip
Redirect: https://codeload.github.com/npm/npm/zip/v2.5.1
Download file from https://codeload.github.com/npm/npm/zip/v2.5.1
v2.5.1
Content length is 3.12mb
Download 100%, 3.12mb / 3.12mb, 1.01mb/s ...
Donwload done
Download npm 2.5.1 is done
Start unzip "C:\Users\Jim\.nvmw\v0.12.0\npm.zip" to "C:\Users\Jim\.nvmw\v0.12.0"

The system cannot find the file specified.
C:\Users\Jim\.nvmw\v0.12.0\npm-2.5.1
        1 dir(s) moved.
        1 file(s) copied.
C:\Users\Jim\.nvmw\v0.12.0
npm install ok
Finished
Now using node v0.12.0 x32

c:\projects\weewikipaint>node --version
v0.12.0
@am11
Copy link

am11 commented Mar 8, 2015

Same happens here. It always fails on first attempt with Can't get 'content-length'. @fengmk2 any ideas what goes wrong in first attempt?

@palamccc
Copy link

+1,
Can't get 'content-length'
Can't get npm: https://github.com/npm/npm/archive/v1.4.23.zip

@omerts
Copy link

omerts commented Mar 30, 2015

I had the same problem, running CMD as administrator solved it for me. (I had to run it a couple times before it worked)

@tgfjt
Copy link

tgfjt commented Apr 6, 2015

+1 definitly same on me.

@babsonmatt
Copy link

+1

@adibsaad
Copy link

adibsaad commented Apr 8, 2015

@omerts got this issue on x64 Windows 8.1. Running CMD as admin worked for me.

@andythecoderman
Copy link

+1 I had a similar issue before and it would work on the second try, now says the version already exists and doesn't get npm along with node.

However if I run it once, leave the command window open, delete the newly installed node version folder and rerun it works as expected

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants