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

Cannot switch node version #67

Closed
bennycode opened this issue Jun 15, 2015 · 11 comments
Closed

Cannot switch node version #67

bennycode opened this issue Jun 15, 2015 · 11 comments

Comments

@bennycode
Copy link
Contributor

I installed nvm (when node 0.12.4 was already installed) and nvm detected my node version and asked me if it should manage it. I said "yes" and after doing this I installed node 0.10.33 with nvm install 0.10.33. Then I switched the node version by using nvm use 0.10.33 but now I cannot switch back although the node 0.12.4 lists up when executing nvm list.

Here is my log:

C:\Users\Benny>nvm list

    0.12.4
  * 0.10.33 (Currently using ?-bit executable)

C:\Users\Benny>nvm use 0.12.4
node v0.12.4 (64-bit) is not installed.

C:\Users\Benny>nvm install 0.12.4
Downloading node.js version 0.12.4 (64-bit)... Error while creating C:\Users\Benny\AppData\Roaming\n
vm\v0.12.4\node64.exe - open C:\Users\Benny\AppData\Roaming\nvm\v0.12.4\node64.exe: Access is denied
.
Error while downloading http://nodejs.org/dist/v0.12.4/x64/node.exe - invalid argument
Complete
@bennycode
Copy link
Contributor Author

Ok, I found a workaround. I started the cmd with Administrator privileges and ran nvm install 0.12.4 which installed node using nvm (overriding my existing node 0.12.4). Afterwards I was able to switch using nvm use 0.12.4.

However, nvm list cannot show which version (32-bit or 64-bit) I have installed, it shows:

C:\WINDOWS\system32>nvm install 0.12.4
Downloading node.js version 0.12.4 (64-bit)... Complete

C:\WINDOWS\system32>nvm use 0.12.4
Now using node v0.12.4 (64-bit)

C:\WINDOWS\system32>nvm list

  * 0.12.4 (Currently using ?-bit executable)
    0.10.33

@ghost
Copy link

ghost commented Jun 26, 2015

I also couldn't use nvm use. In my case the problem was that the folder C:\Program Files\nodejs existed from a previous installation of nodejs that was already uninstalled however. After deleting this folder manually, nvm worked correctly. It now creates the symlink.

@asilvas
Copy link

asilvas commented Oct 26, 2015

Same. Appears to be an installer bug. Either update doc to reflect this requirement (to remove existing node) or fix installer please.

@danielkrainas
Copy link

+1 on the issue of not being able to properly use a version due to the c:\program files\nodejs folder still being present after uninstalling a previous install of node. nvm gave no hint or message that there was an issue creating the symlink.

@kuncevic
Copy link

kuncevic commented Dec 8, 2015

@sanjo @danielkrainas
What is the mystery with C:\Program Files\nodejs folder?
I had same issue:

nvm list    
      * 5.1.1 (Currently using 64-bit executable)
        4.2.1

Then until I renamed the c:\program files\nodejs folder I wasn't being able to switch between versions using nvm use <version> command. Do we need that folder at all?
UPDATE:
After I switch the node versions fom 5x to 4x and back using command above I realized that link nodejs was created in folder c:\program files\ so now I've got this:
image

It sounds like I really do not need my old node folder at all which is nodejs_ any more

@danielkrainas
Copy link

@Riapp no, you don't need it. It prevents the shortcut from being made. Even after uninstalling node, you may still have that folder and you will need to remove it manually.

@vipinrvbridge
Copy link

C:>nvm use v8.4.0 64
node v8.4.0 (64-bit) is not installed.

C:>nvm install v8.4.0 64
Downloading node.js version 8.4.0 (64-bit)...
Error while creating C:\Users\vipin.rv\AppData\Roaming\nvm\v8.4.0\node64.exe - open C:\Users\vipin.rv\AppData\Roaming\nvm\v8.4.0\node64.exe: Access is denied.
Error while downloading https://nodejs.org/dist/v8.4.0/win-x64//node.exe - invalid argument
Complete

How to redirect this download url

@richa-gitacc
Copy link

I had the same issue. First I installed node 6.9.5 from nvm. Then when I installed node 8.11.4 from downloaded .exe, version of node automatically switched to 8.11.4. After that I was not able to switch to version 6.9.5 untill I uninstalled node from control panel, then changed the name of nodejs folder still existing. Then installed version 8.11.4 from nvm.

Now I can switch between the two versions.
Is it the case that when we install node using installer then nvm doesnot work?

@hkumar0132
Copy link

hkumar0132 commented Jan 10, 2021

This happens to be the issue till date and deleting nodejs folder does not work.
The only things we need to take care of is to run nvm install using cmd as administrator

@Bianxzy20
Copy link

I had the same issue but the problem that I often saw is that its because of the directory name it has a white space. I have a lot of problems with this.

@Bianxzy20
Copy link

I also couldn't use nvm use. In my case the problem was that the folder C:\Program Files\nodejs existed from a previous installation of nodejs that was already uninstalled however. After deleting this folder manually, nvm worked correctly. It now creates the symlink.

I have a symlink but still doesn't work, I also try to delete the nodejs folder and got the same error saying the status exit 1

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

9 participants