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

nvm use not work #18

Closed
avevlad opened this issue Nov 2, 2014 · 31 comments
Closed

nvm use not work #18

avevlad opened this issue Nov 2, 2014 · 31 comments

Comments

@avevlad
Copy link

avevlad commented Nov 2, 2014

video -> http://www.youtube.com/watch?v=L9rSo6e32yM

C:\Windows\system32>nvm

Running version 1.0.6.

Usage:

  nvm arch                     : Show if node is running in 32 or 64 bit mode.
  nvm install <version> [arch] : The version can be a node.js version or "latest" for the latest stable version.
                                 Optionally specify whether to install the 32 or 64 bit version (defaults to system arch).
                                 Set [arch] to "all" to install 32 AND 64 bit versions.
  nvm list [available]         : List the node.js installations. Type "available" at the end to see what can be installed. Aliased as ls.
  nvm on                       : Enable node.js version management.
  nvm off                      : Disable node.js version management.
  nvm proxy [url]              : Set a proxy to use for downloads. Leave [url] b lank to see the current proxy.
                                 Set [url] to "none" to remove the proxy.
  nvm uninstall <version>      : The version must be a specific version.
  nvm use [version] [arch]     : Switch to use the specified version. Optionally specify 32/64bit architecture.
  nvm use <arch> will continue using the selected version, but switch to 32/64 bit mode.
  nvm root [path]              : Set the directory where nvm should store different versions of node.js. If <path> is not set, the current root will bedisplayed.
  nvm version                  : Displays the current running version of nvm for Windows. Aliased as v.


C:\Windows\system32>nvm list

    0.11.14
    0.11.11
  * 0.10.32 (Currently using 64-bit executable)

C:\Windows\system32>nvm use 0.11.11
Now using node v0.11.11 (64-bit)

C:\Windows\system32>node -v
v0.10.32

C:\Windows\system32>nvm install 0.11.11 64
Version 0.11.11 is already installed.

C:\Windows\system32>nvm install 0.11.11 32
Downloading node.js version 0.11.11 (32-bit)...
C:\Windows\system32>nvm install 0.10.33
Downloading node.js version 0.10.33 (64-bit)... Complete

Could not retrieve https://raw.githubusercontent.com/coreybutler/nodedistro/mast
er/nodeversions.json.


Get https://raw.githubusercontent.com/coreybutler/nodedistro/master/nodeversions
.json: EOF
C:\Windows\system32>nvm list

    0.11.14
    0.11.11
    0.10.33
  * 0.10.32 (Currently using 64-bit executable)

C:\Windows\system32>nvm install 0.10.33 32
Downloading node.js version 0.10.33 (32-bit)... Complete
Downloading npm version 1.4.28... Complete
Installing npm v1.4.28...

Installation complete. If you want to use this version, type

nvm use 0.10.33

C:\Windows\system32>nvm list

    0.11.14
    0.11.11
    0.10.33
  * 0.10.32 (Currently using 64-bit executable)

C:\Windows\system32>node -v
v0.10.32

C:\Windows\system32>nvm use 0.10.33
Now using node v0.10.33 (64-bit)

C:\Windows\system32>node -v
v0.10.32

C:\Windows\system32>
@vkbansal
Copy link

vkbansal commented Nov 3, 2014

Changing node versions requires admin rights. Have you tried with elevated command prompt?

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

@vkbansal Yes, I changing node versions the administrator, will soon record video

@vkbansal
Copy link

vkbansal commented Nov 3, 2014

Which version of Windows are you using?

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

@vkbansal 8.1

@vkbansal
Copy link

vkbansal commented Nov 3, 2014

Can you try this:

  1. Right-Click Start Button.
  2. Choose Command Prompt (Admin) and try nvm use

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

video -> http://www.youtube.com/watch?v=L9rSo6e32yM

my %PATH%

C:\ProgramData\Oracle\Java\javapath
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\tools\ruby213\bin
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\Git\cmd
C:\Program Files\Java\jdk1.8.0_25\bin
C:\Program Files (x86)\scala\bin
C:\Users\Vlad\AppData\Roaming\npm
C:\ProgramData\chocolatey\bin
C:\tools\cygwin\bin
C:\gradle-2.1\bin
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Tool kit\
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\
C:\Program Files (x86)\GNU\GnuPG\pub
C:\Program Files\OpenVPN\bin
C:\xampp\php
C:\ProgramData\ComposerSetup\bin
C:\HashiCorp\Vagrant\bin
C:\Users\Vlad\AppData\Roaming\nvm
C:\Program Files\nodejs
C:\Users\Vla d\AppData\Roaming\nvm
C:\Program Files\nodejs

@vkbansal
Copy link

vkbansal commented Nov 3, 2014

I've seen your video

when you run nvm use 0.11.14
it says node v0.11.14 (64-bit) is not installed

So I think your problem that you have 32-bit versions of node installed

try nvm use 0.11.14 32 or nvm install 0.11.14 64

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

@vkbansal
Copy link

vkbansal commented Nov 3, 2014

That seems an odd bug. I'm able to run everything fine

capture

maybe @coreybutler will be able to comment

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

@vkbansal ok waiting

@coreybutler
Copy link
Owner

Did you use the installer to install NVM?

If you type echo %NVM_HOME% and echo %NVM_SYMLINK%, what shows up?

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

@coreybutler yes

C:\Windows\system32>echo %NVM_HOME%
C:\Users\Vlad\AppData\Roaming\nvm

C:\Windows\system32>echo %NVM_SYMLINK%
C:\Program Files\nodejs

@coreybutler
Copy link
Owner

Does %NVM_HOME%\v0.11.11\node.exe -v show the proper version? How about %NVM_HOME%\v0.11.11\node32.exe -v and %NVM_HOME%\v0.11.11\node64.exe -v

There are three areas I can think of that could be causing the issue. The symlink may not be updating properly, but that's hard to tell from what we can see. The other possibility is the use function may be aborting without an error before the symlink is updated, which I should be able to determine by your response to the above question. The final area is perhaps there is something with the Russian version of Windows that NVM isn't accounting for.... but the first two issues seem more likely.

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

@coreybutler install https://github.com/marcelklehr/nodist, work 😃

Thanks for support! 👍

@avevlad avevlad closed this as completed Nov 3, 2014
@coreybutler
Copy link
Owner

Obviously you're welcome to use nodist, but this isn't a fix, so I'm reopening this.

@coreybutler coreybutler reopened this Nov 3, 2014
@vkbansal
Copy link

vkbansal commented Nov 3, 2014

@avevlad It would be great, If you could help @coreybutler in fixing this bug.

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

@coreybutler @vkbansal go skype and share screen teamviewer

@avevlad
Copy link
Author

avevlad commented Nov 3, 2014

@coreybutler @vkbansal skype or hangouts

@romualdr
Copy link
Contributor

I guess this issue is related to #37 !

@g0t4
Copy link

g0t4 commented Mar 17, 2015

FYI, if you had node installed before, delete C:\Program Files\nodejs and nvm windows will create the symlink

@moshest
Copy link

moshest commented Apr 27, 2015

same problem for me.

@butlersrepos
Copy link

I had this issue on Win7 and tl;dr is that I had chosen my symlinks directory as a folder with my original installation of NodeJS and when I emptied that folder out and ran nvm use 0.12.1 then it populated the folder and everything worked as expected for me.

T:\Development
λ echo %NVM_HOME%
C:\Users\butlersrepos\AppData\Roaming\nvm

T:\Development
λ echo %NVM_SYMLINK%
T:\development\nodejs

@stramel
Copy link

stramel commented Jul 7, 2015

I got this to work by deleting the NVM_SYMLINK path that existed and running nvm use 0.12.6 again.

@estvmachine
Copy link

Ok delete NVM_SYMLINK path that existed and running nvm use 0.x.x works for me too 👍

@duc-nguyen-locm
Copy link

For me, there was a path to the old version in the PATH environment setting. After removing the old from the PATH setting everything works.

@mcphelan
Copy link

I was getting this when trying to install new version

C:\WINDOWS\system32>nvm install 6.4.0

Could not retrieve https://raw.githubusercontent.com/coreybutler/nodedistro/master/nodeversions.json.

Get https://raw.githubusercontent.com/coreybutler/nodedistro/master/nodeversions.json: EOF

Tested the URL in browser and would not load with SSL exception.

Fix:
I updated my Asus router's Frimware and url was accessible in browser and nvm install command started to work.

I had suspect it was network related as command worked on works network, note home network does not use proxy.

If you are getting this exception ensure you can access the url in a browser 1st, before you start changing your Path.

@UltimateTechDeveloper
Copy link

I did what g0t4 advsed and deleted the content in the folder c:\program files\nodejs
I used the command nvm user 4.6.0 and this time it worked.
This was done on a windows 7 enterprise, 64bit

@altanai
Copy link

altanai commented Jan 3, 2018

Same problem . Trying to update node version from 4.5.0 to 5.0.0

Removed symlink as suggested in above posts $ export NVM_SYMLINK=
Then have nvm use command $ nvm use 5.0.0
Now using node v5.0.0 (64-bit)

Checked Node version it was still 4.5 instead of 5.0.0 $ node -v
v4.5.0

Even tried uninstall , which gave an error
$ nvm uninstall 4.5.0
Uninstalling node v4.5.0...Error removing node v4.5.0
Manually remove C:\Users\techmadmin\AppData\Roaming\nvm\v4.5.0.

Still the nvm list command shows im using node 4.5.0 insted of 5.0.0
$ nvm list
7.6.0
5.0.0

  • 4.5.0 (Currently using 64-bit executable)

@ghost
Copy link

ghost commented Jun 5, 2018

try to start with a new fresh instalation of NVM, as the documentation say, if you have a previous version of node installed on your PC, erase it and install it again using NVM.

"C:\Program Files\nodejs" and "C:\Users\AppData\Roaming\npm" directories must be erased before install Node versions

@answer-huang
Copy link

Pls check your system's environment variable path, if you installed node manually, it will add path to your system's path, this may cover your nvm's path.

@coreybutler
Copy link
Owner

Closing this for the following reasons:

  1. It's documented that prior editions of Node should be removed before installing NVM4W.
  2. The installer now attempts to remove a prior version of Node whenever possible.
  3. This issue was originally filed before the Node Foundation released a proper JSON list of available versions. The prior edition was using the hacked nodeversions.json file I maintained (which was just scraping Node's release list for versions).
  4. This thread is getting clouded with multiple issues (such as permissions).

If anyone still experiences these issues with v1.1.7 or later, please open a new issue.

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

No branches or pull requests