Nvm-windows: Nvm use failed with "Windows cannot access the specified device, path, or file..."

Created on 14 Jan 2019  路  6Comments  路  Source: coreybutler/nvm-windows

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

  • [ ] Windows 7 or below (not truly supported due to EOL - see wiki for details)
  • [ ] Windows 8
  • [ ] Windows 8.1
  • [x] 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:

  • [x] 1.1.7
  • [ ] 1.1.6
  • [ ] 1.1.5
  • [ ] 1.1.4
  • [ ] 1.1.3
  • [ ] 1.1.2
  • [ ] 1.1.1
  • [ ] Older
  • [ ] OTHER (Please Specify)

I have already...

  • [x] read the README to be aware of npm gotchas & antivirus issues.
  • [x] reviewed the wiki to make sure my issue hasn't already been resolved.
  • [x] verified I'm using an account with administrative privileges.
  • [x] searched the issues (open and closed) to make sure this isn't a duplicate.
  • [x] 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+?)
  • [x] A standard shell environment (terminal/powershell)
  • [ ] A non-standard shell environment (Cmder, Hyper, Cygwin, git)

Expected Behavior

Should activate Node v8.15.0

Actual Behavior

After running nvm use 8.15.0 and approving session elevation I got a pop up error Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.

Back in the terminal, it shows message Now using node v8.15.0 (64-bit) but when I run nvm list I don't see an asterisk on 8.15.0. Also, running node and npm returns an error that they don't exist.

Steps to reproduce the problem:

  1. Install using NVM MSI 1.1.7
  2. Open command prompt and type in nvm install 8.15.0
  3. Run nvm use 8.15.0

My root path doesn't contain any white space. This is a problem I'd likely need to debug (an excuse to try out Go)

Most helpful comment

I have something similar here, not sure if it's the exact same issue though.
nvm use 8.15.0
Execution of the Windows Script Host Failed. (Access is denied.)
I am the admin.
Thanks.

All 6 comments

Are you also seeing this?

image

No, what I see is exactly as how I described it. No elevation or VB error.

I have something similar here, not sure if it's the exact same issue though.
nvm use 8.15.0
Execution of the Windows Script Host Failed. (Access is denied.)
I am the admin.
Thanks.

I'm not able to reproduce on my machine.

Is it possible due to a custom installation path on the C drive as the root instead of installing NVM in the default AppData directory? My NVM path is C:\Users\brian\AppData\Roaming\nvm.

I'm on Windows 10 64 Bit German.
I have to use "surun" for the installation because I don't have admin rights and no admin account in this corporate network.
Installed nvm 1.1.7 into "C:\Programme Meine\nvm".
During installation did set node path "C:\Programme Meinenode".
Called "nvm install 0.8.22".
Calling "nvm use 0.8.22" gives me the following error:

exit status 1: Der Befehl "C:\Programme" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

Rougly translated from German:

exit status 1: The command "C:\Programme" is written wrong or could not be found."

It probably is related to the whitespace in one of the path names. After a full uninstallation I did the installation again, but with "C:\Programme-Meine" (no whitespace!) and it seems to work now.

I'm sorry if this should not be related to this issue.

Like PyrateAkananto, I installed both node and nvm in C:\Program Files\, and the space is not handled when doing nvm use, and you get the error 'C:\Program' is not recognized...

To fix, I edited the settings.txt file;

root: C:\Progra~1\nvm
path: C:\Progra~1\nodejs
Was this page helpful?
0 / 5 - 0 ratings