Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change version not work #182

Closed
iahu opened this issue Nov 9, 2016 · 9 comments
Closed

change version not work #182

iahu opened this issue Nov 9, 2016 · 9 comments

Comments

@iahu
Copy link

iahu commented Nov 9, 2016

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.

@marcelklehr
Copy link
Member

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

@iahu
Copy link
Author

iahu commented Nov 10, 2016

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                                           

@Vistritium
Copy link

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

@marcelklehr
Copy link
Member

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.

@Vistritium
Copy link

Vistritium commented Nov 23, 2016

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

@iahu
Copy link
Author

iahu commented Nov 23, 2016

thanks

发自我的iNokia

在 2016年11月23日,20:52,Maciej Nowicki [email protected] 写道:

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.

@marcelklehr
Copy link
Member

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

@coolguy001tv
Copy link

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).

@wbt
Copy link

wbt commented Feb 21, 2020

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.

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

No branches or pull requests

5 participants