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
Why doesnt work to switch node version via "nvm use" #321
Comments
the same |
+1 |
Same with nvm 1.1.5 :
|
@biologeek same thing :/ |
This occurs most often due to use of an unprivileged user account. Your account must have administrator-level permissions, because Windows requires it for symlinks. |
I am admin on my pc. Though I could overcome this issue by manually renaming folders so that nvm symlink points to the version I need. |
@biologeek - you still need admin access to rename directories within |
+1 on this issue: I can't change the version. |
Workaround: |
Can confirm what @ituasdu said. Thanks! |
@ituasdu solved my problem,thx |
Hi, same issue here. NVM creates a a symlink to the installed node version. The problem is that Windows 7 requires admin right levels to create a symlink, and it's not the case anymore in Windows 10. A workaround is to use junctions ('hard' links) on Windows 7 with the parameter '/J'. Junctions don't require admin rights levels and a low privileges user accounts as mine can use it. Example:
Question: Wouldn't it be a good idea to use junctions instead of symlinks ? Or at least specify a option to nvm eg '--junctions' ? I'm thinking about creating a pull request for this as it's blocking for my company. Would it be helpful ? |
@nan0 making a junction on windows 7 isn't working... it still won't switch versions.
I ran the command you provided in your post: Issue 1: Issue 2: Is there anything else that can be done? I'm using: |
never mind it does work. I realized that I was making the renaming C:\Program Files\nodejs to C:\Program Files\ nodejsx So to sum up the solution is this: with no stand alone node installed. In the |
For those interested in contributing, thank you! However; I want to point out that junctions were explicitly avoided because they will not work across different hard drives. This was a particular sore spot in enterprise networks with shared drives/mapped drives. |
@ituasdu It solved my problem, |
My computer is Windows 7, and I have administrator privileges. In the same situation, NVM cannot change version.My approach is to set up NVM_SYMLINK D:\Project\ NVM \ v8.11.4 in the environment variable.Switching node versions only requires changing the version number corresponding to the environment variable NVM path, such as: NVM_SYMLINK D:\Project\ NVM \ v6.9.0.In this way, although the problem was solved, every time I changed the version, it was troublesome, and I did not find a better solution for the moment. |
The solution of "Sagan" from stack overflow works for me: |
This is happening for me on Windows 10 10.0.17134.165 |
I had the same problem when switching between node 6.6.0 and 7.9.0 (Windows 10) but ituasdu's solution wasn't working. Re-installing nvm didn't work either. I ran nvm install latest (installed 11.3.0) and this somehow fixed it for me. |
|
@ituasdu worked for me too.. thanks.. :) |
@ituasdu Thanks, worked like a charm. I believe this happens when people have NodeJS installed previously directly without nvm and then try to use node through nvm. |
This also works for me, thanks. I don't know if this could drop some light to the issue but in my case I think this had happen after install a new version of node without nvm (manually). Seems that this action makes crazy nvm. |
@coreybutler any thoughts on installing the symlink on a folder that doesn't require admin privs? I know this might be slightly, bad form in Windows dev, but it will definitely side-step all of these issues, especially in a highly-locked-down, enterprise environment where getting admin privs is a huge pain. Other pain is what I am currently suffering through (not because of nvmw) where, although I do indeed have admin privs in some instances, every time I want to switch between versions of node, I have to open up a whole other cmd window, run cmd as admin and finally run just a thought. ;-) |
Run |
I have to run I tried to fix it by installing Link Shell Extension and doing the following steps:
But unfortunately the problem is still occurring. |
Can confirm @ituasdu solution worked for me also. |
@ituasdu works for me, thnks. |
@monico-moreno - next time ping me via email when I don't respond for months at a time :) To answer your question, you can install to any folder you want using the installer. However; all symlinks on Windows require admin privileges, except for some developer modes on newer editions of Windows 10. Bottom line is admin privileges come into play at some point. Also, maybe you can beta test the menu system when I wrap it up (switch versions from the Windows task bar). Would that be a better workflow? |
|
I just had similar issue, but different reason.
IIRC I had previous nvm version installed to D:\soft and it was changing link D:\soft\nodejs. At some point old nvm stopped working, because npm repository changed location (if it works - don't touch, please). I had to install new nvm, and I guess new nvm refused to change old link, instead it was updating link C:\Program Files\nodejs. So I removed D:\soft\nodejs and it was fixed. Thanks to @delepster who suggested to uninstall old node, that helped me to spot the problem |
we installed on three computers today, two of them windows 10 operating system installed and one with windows server. Both machines with windows 10 OS lost their search at startup features but not the one with Windows Server OS. so, you can not type the name of the program you want and see anymore. Anyone else having the same issue? |
@putko this is a windows issue appeared today, confirmed and fixed by MS. see this tweet https://twitter.com/tomwarren/status/1225110095010418689 |
This worked for me too. |
Had a similar problem with The Lines 727 to 751 in 88353cf
|
Latest version of Windows 10 Pro where I went through a fresh install I encountered the same issue. My usual steps to setting up my machine is:
@ituasdu is correct in his assertion, when I renamed my nodejs file it allowed me to use nvm use and actually set it. Otherwise it would succeed falsely and tell me version set and so forth but it didn't set the version and I'm stuck with the LTS that was installed initially. I know there is actually a line saying we should uninstall the existing node that I missed the first time around on the README.md but having used nvm-windows before I didn't check it again I just installed it via chocolatey and forgot about that. (is it possible to just do the npm uninstall as part of the install for chocolatey or to just detect if there is one and to prompt the user to uninstall it first before allowing them to install nvm?) |
I think it is possible: this request should be made to the Chocolatey nvm package maintainer. |
It happens when you have Node separately installed on your machine (from website or package manager). Uninstalling them and installing through nvm should solve the problem. |
Can confirm @ituasdu solution worked for me on Windows 10. |
At the end, I have to manually edit System environment variable NVM_SYMLINK. |
3 years later and this is still the right answer. THANK YOU! |
C:\Program Files>nvm version C:\Program Files>nvm ls
C:\Program Files>nvm use 14.17.3 C:\Program Files>node -v C:\Program Files>npm -v C:\Program Files> |
@ituasdu 's answer solved the problem thank you! 3 years have passed and the issue still exists, surprisingly. I wonder if any of the accepted PR's since last release would solve this problem, 3 years is a pretty big release window. |
There is nothing to "fix". When Node.js is previously installed at |
If this is a question about how to use NVM4W, please use stackoverflow instead.
If this is an issue regarding antivirus, make sure you search the existing issues first.
My Environment
I'm using NVM4W version:
I have already...
My issue is related to (check only those which apply):
Expected Behavior
i tried to switch v8.9.1 to 6.12.0 (node version)
Actual Behavior
but, it didnt switch to 6.12.0 or another versions.
(i installed 8.9.1 at last)
Steps to reproduce the problem:
i opened cmd via administrator.
C:\Windows\system32>nvm ls
7.1.0
6.12.0
C:\Windows\system32>node -v
v8.9.1
C:\Windows\system32>nvm use 6.12.0
Now using node v6.12.0 (64-bit)
C:\Windows\system32>node -v
v8.9.1
C:\Windows\system32>nvm ls
7.1.0
6.12.0
The text was updated successfully, but these errors were encountered: