-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 root elevate.cmd: file does not exist #505
Comments
Workaround: Seems like re-installing nvm-windows into the root folder that I wanted fixed this issue. But this doesn't seem like the correct functionality. |
When you say you had a version of Node installed, do you mean you had a prior version that was installed using |
Yes I had Nvm installed correctly in a different root and when using Nvm root command I had expected it to migrate to the new location. |
@Poltergeisen thanks for clarifying. NVM4W doesn't currently move prior installations, but I think that's a reasonable expectation in this circumstance. I've marked this as an enhancement request. |
What is the point of the I have followed the same steps as Poltergeisen (albeit with a different path and versions of node). And I am seeing the same error. But I had no expectation that any existing node versions would be moved. I had no existing node versions. I did these steps
And like Poltergeisen I got
But if |
@capsocrates The command is used more often in CI/CD processes where there are no existing installations. Consider running in a Docker container. Once the container boots, you can point to a mounted directory (i.e. a pseudo-dynamic directory). After reviewing the code again, I am thinking there may be a bug (as originally described), because the elevate command really should move to the new root. I may have mistakenly jumped to a conclusion about permissions instead focusing on the file transfer itself. That would be the bug if I can confirm it. NVM4W will still not move the prior node installations by default... but having an option to do that seems like a reasonable enhancement request. I don't want to enable that by default because there are a lot of users whose environments are spread across mapped/remote drives. Moving global |
That use case makes sense and would explain why the current behavior is considered to "work." For my part I don't care about transferring the existing installs as part of this command (though I'm sure it would be a nice option to have in a flag). But it would be nice if it worked as described :) |
I agree, this is a bug. bl9l's solution works. I wanted my nvm4w install location and the root for my node installs to be different. I assumed that is the point of the root command. However, the files above also need to be where the root directory is set and the workaround is working but not expected. |
When installing nvm - set in installation to "c:\path}" ; |
我也遇到了同样的问题。尝试使用了1.19版本,完美的解决了此问题 |
Try this.
|
It is a bug of pointing to the correct folder in the code. The manual installation explicitly states those files are installed in %NVM_HOME% while the node.js versions are stored in %NVM_SYMLINK%. |
Facing the same problem after installing through scoop. Changing the root path does not help. |
Because this is the first thing that shows up on Google: I updated nvm to version 1.1.12 using scoop and now have this error whenever I I reverted back to nvm 1.1.11 and it works fine again. Mentioning #1069 for reference. Looking at scoop nothing unexpected changed Comparing the contents of 1.1.11/nvm-noinstall.zip and 1.1.12/nvm-noinstall.zip all the files seem to be present and only the nvm.exe has changed. |
The scoop issue about nvm-windows 1.1.12 not working is here: ScoopInstaller/Main#5311 |
The above solutions of copying the nvm application from the NVM_HOME into the NVM_ROOT folder is not working for me. My usecase may be slightly different (not moving a working installation to a different folder, but rather using nvm to manage node-version(s) without administrative rights: As @olallier mentioned, I believe the bug to be confusing NVM_HOME and NVM_ROOT. (hoping that the installed location of elevate.cmd can elevate the permissions of nvm to manage the sym-link. PS: the software distribution in our organisation is not giving any control over the installation of nvm itself. |
@mar10br0 I hate to say it, but I don't think there is anything you can do other than petition the powers that be to grant you more capabilities. Also, see Runtime, which is the version manager we're building for enterprise/corporate use. |
Thanks @coreybutler, I'll dive into those resources 👍 |
It helped me‼!!!!!!!!!!!!!!! |
My Environment
Windows 7 or below (not truly supported due to EOL - see wiki for details)
Windows 8
Windows 8.1
Windows 10
Windows 10 IoT Core
Windows Server 2012
Windows Server 2012 R2
Windows Server 2016
My Windows installation is non-English.
I'm using NVM4W version:
1.1.7
I have already...
My issue is related to (check only those which apply):
Expected Behavior
Using
nvm root C:\Git\nvm
should set my nvm root to that folder. Then runningnvm install 10.17.0
andnvm use 10.17.0
should work.Actual Behavior
nvm root
will set my root directory to the right place. Butnvm use 10.17.0
is not working and is giving me the errorexec: "C:\\Git\\nvm\\elevate.cmd": file does not exist:
Steps to reproduce the problem:
I had a previously existing version of node running. Our security team changed our virus scanners to be more restrictive in our appdata folders so I tried to move NVM into an excluded folder using
nvm root C:\Git
. Then I installed the version of node that I needednvm install 10.17.0
and when trying to donvm use 10.17.0
this happened.The text was updated successfully, but these errors were encountered: