nodists / nodist

Natural node.js and npm version manager for windows.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

change version not work

iahu opened this issue · comments

commented

Hi, It seem that, nodist not work for me.
Here is my cmd log.

C:\Users\xxx>nodist global 7
7

C:\Users\xxx>nodist
  (x64)
  6.9.1
> 7.1.0  (global: 7)

C:\Users\xxx>node -v
v4.4.7

C:\Users\xxx>nodist
  (x64)
  6.9.1
> 7.1.0  (global: 7)

C:\Users\xxx>

Thanks for any comment.

hey there!
Could you enable debug mode and run the commands again? You can enable debug mode by doing set DEBUG=nodist:*.

commented

Hi @marcelklehr, I have try again under the debug mode. Unfortunately, not works.

xxx@pc MINGW64 /e/source    
$ nodist global 7.1.0                            
7.1.0                                            

xxx@pc MINGW64 /e/source    
$ nodist                                         
  (x64)                                          
  6.9.1                                          
> 7.1.0  (global: 7.1.0)                         

xxx@pc MINGW64 /e/source    
$ node -v                                        
v4.4.7                                           

I have the same problem.

C:\Users\xxx>nodist global 4.x
  nodist:nodist getPathToGlobalVersion +0ms C:\Program Files (x86)\Nodist\.node-
version-global
4.x
C:\Users\xxx>nodist
  nodist:nodist getPathToGlobalVersion +0ms C:\Program Files (x86)\Nodist\.node-
version-global
  (x64)
> 4.6.2  (global: 4.x)
  6.9.1
C:\Users\xxx>node --version
v6.9.1

Sorry for the delay.

@iahu Your log doesn't look like debug mode is enabled. In bash (mingw) you'd have to export DEBUG=nodist:* instead of set DEBUG=nodist:*

@Vistritium You seem to have enabled debug mode successfully, however when running node, the shim is not executed. Try running node -e "console.log(process.execPath)" to check which node binary is actually executed and post the output here, please.

I have installed it on fresh computer without having nodejs installed prior to it and it works correctly now.

commented

thanks

发自我的iNokia

在 2016年11月23日,20:52,Maciej Nowicki notifications@github.com 写道:

I have installed it on fresh computer without having nodejs installed prior to it and it works now.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I assume the issue was resolved. Let me know if that's not the case! :)

It seems that u didn't uninstall node before install nodist.
I find it's ok when I uninstall my nodejs from control panel (win 7).

commented

I also encountered this issue.
I was sure to uninstall node prior to installing nodist.
When installing nodist, I encountered issue #226 aka #145, for which a fix has been developed but not rolled out. As a result of that issue, I had manually edited my PATH to include C:\Program Files (x86)\Nodist and Get-Command node was showing that the node command was running from there - so it looked like everything was correct. If you are encountering this issue, try running Get-Command node [in PowerShell] to make sure it's not pulling node from somewhere else.

However, npm --version was reporting that npm wasn't found. Adding C:\Program Files (x86)\Nodist\bin to the path and restarting fixed that issue, but left this one. node --version always reported the Node version initially installed with nodist, even though it was NOT what was shown as selected in the nodist command (and after removing it, this version wasn't even listed in that command output at all.

This comment helped me recognize that I needed to remove C:\Program Files (x86)\Nodist from the PATH and after another reboot things started working more as expected.

I don't understand why the nodist install script puts a version of node at C:\Program Files (x86)\Nodist which differs from any of the ones it is listed as managing, because that just seems like a distraction likely to produce this specific issue. I would propose removing that node.exe while keeping the one in \bin, but would want that proposal vetted by someone who knows why it was added in the first place.