nvm-windows: nvm root elevate.cmd: file does not exist

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…

  • read the README to be aware of npm gotchas & antivirus issues.
  • reviewed the wiki to make sure my issue hasn’t already been resolved.
  • verified I’m using an account with administrative privileges.
  • searched the issues (open and closed) to make sure this isn’t a duplicate.
  • made sure this isn’t a question about how to use NVM for Windows, since gitter is used for questions and comments.

My issue is related to (check only those which apply):

  • settings.txt
  • proxy support (Have you tried version 1.1.0+?)
  • 32 or 64 bit support (Have you tried version 1.1.3+?)
  • Character escaping (Have you tried version 1.1.6+?)
  • A standard shell environment (terminal/powershell)
  • A non-standard shell environment (Cmder, Hyper, Cygwin, git)

Expected Behavior

Using nvm root C:\Git\nvm should set my nvm root to that folder. Then running nvm install 10.17.0 and nvm use 10.17.0 should work.

Actual Behavior

nvm root will set my root directory to the right place. But nvm use 10.17.0 is not working and is giving me the error exec: "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 needed nvm install 10.17.0 and when trying to do nvm use 10.17.0 this happened.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 6
  • Comments: 16 (3 by maintainers)

Most upvoted comments

Hi guys. The solution for those who face the same problem.

Copy these files image

Into new root directory manually image

Facing the same problem after installing through scoop. Changing the root path does not help.

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.

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 nvm use <something>: exec: "elevate.cmd": executable file not found in %PATH%:

I reverted back to nvm 1.1.11 and it works fine again. scoop reset nvm@1.1.11

Mentioning #1069 for reference.

Looking at scoop nothing unexpected changed https://github.com/ScoopInstaller/Main/commit/a09fed86cdbf265649b96a305116bacd6f1a3f5e

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.