nodists / nodist

Natural node.js and npm version manager for windows.
MIT License
1.61k stars 214 forks source link

Problem with 4.1.2 as of 10-05-2015 #93

Closed nullivex closed 8 years ago

nullivex commented 9 years ago

Hi,

I just ran the following and am seeing some strangeness.

C:\Users\Mac>nodist 0.12.0
nodev0.12.0

C:\Users\Mac>node -v
v0.12.0

C:\Users\Mac>nodist selfupdate
Installing latest stable version...
nodev4.0.0
Update dependencies...
mkdirp@0.3.5 node_modules\mkdirp
request@2.9.203 node_modules\request
vows@0.9.0-rc3 node_modules\vows
├── diff@1.2.2
├── eyes@0.1.8
└── glob@4.3.5 (inherits@2.0.1, inflight@1.0.4, once@1.3.2, minimatch@2.0.10)

C:\Users\Mac>node -v
v4.0.0

C:\Users\Mac>nodist latest
nodev4.1.2

C:\Users\Mac>node -v
Sorry, there's a problem with nodist.
Error:  fork/exec \nodist/v/nodev4.1.2/node.exe: %1 is not a valid Win32 applica
tion.

Any idea what can be done here?

Just to investigate I went here: https://nodejs.org/dist/v4.1.2/win-x64/ and downloaded the node.exe file and then placed it in C:\nodist\bin\node.exe and renamed the existing to node-old.exe and then I get.

C:\nodist\bin>node -v
v4.1.2

So is it possible nodist is downloading the wrong file?

nullivex commented 9 years ago

Okay,

So I tried this on a different computer.

C:\Users\JT4>nodist latest
nodev4.1.2

C:\Users\JT4>node -v
v4.1.2

C:\Users\JT4>

So Maybe it was a problem resolved upstream. If no one else sees this issue go ahead and close this.

nullivex commented 9 years ago

Okay I got this error again.

C:\Windows\System32>
C:\Windows\System32>nodist latest
nodev4.1.2

C:\Windows\System32>node -v
Sorry, there's a problem with nodist.
Error:  fork/exec C:\nodist/v/nodev4.1.2/node.exe: %1 is not a valid Win32 application.

C:\Windows\System32>nodist latest
nodev4.1.2

C:\Windows\System32>node -v
v4.1.2

C:\Windows\System32>

I was able to resolve it by going to C:\nodist\v and deleting the 4.1.2 folder. After running nodist latest again I got the proper version.

The first version contained a node.exe that was only 100KB after the second try it was the usual ~10MB.

My only guess is that there is a problem with the upstream causing an incomplete download.

marcelklehr commented 9 years ago

Strange :/ Maybe nodist should check, if the executable is actually executable. (You can also use nodist - 4.1.2 to remove a version.)

nullivex commented 9 years ago

How about we just check the SHA256 SUM with the upstream?

http://nodejs.org/dist/v4.1.2/SHASUMS256.txt

I can possibly put together a pull request for this.

nullivex commented 9 years ago

@marcelklehr I submitted a pull request against this originally in #94 however that has been closed.

nullivex commented 9 years ago

Please see PR #97 for the fix that is needed here.

marcelklehr commented 8 years ago

Thanks again for implementing this! Happily closing this :)

KITSMoeNashashibi commented 6 years ago

Another quick solution: go to the directory where Nodist is installed (e.g: C:\Program Files (x86)\Nodist), you'll find 'v-x64' and 'v', check both and see which one has all the installed versions and remove the other one.

I removed the 'v' folder which in my case was causing the conflict as I'm on a x64 OS.