Nvm-windows: After install every command fails with message "C:\Users\%username%\AppData\Roaming\nvm could not be found or does not exist. Exiting."

Created on 3 Feb 2016  ·  11Comments  ·  Source: coreybutler/nvm-windows

If %username% in path C:\Users\%username%\AppData\Roaming\nvm contains some non-latin symbols (in my case username is written with cyrillic characters), every nvm command displays this error message, for example:

C:\Windows\system32>nvm arch
C:\Users\�����\AppData\Roaming\nvm could not be found or does not exist. Exiting.
System Default: 64-bit.
Currently Configured: 64-bit.

Possible solution is to write settings.txt with encoding UTF-8 instead of ANSI. After manual correction of file encoding with Notepad++ error message disappears and now everything works fine:

C:\Windows\system32>nvm arch
System Default: 64-bit.
Currently Configured: 64-bit.
bug help wanted

Most helpful comment

If anyone is suffering from this, here's a suggestion:

  • type "nvm root" to know where is the nvm current path
  • In windows explorer, copy the contents of the previous path to a simpler path like "c:nvm".
  • In system variables, search for NVM_HOME and update its value to the new path.
  • Then type "nvm root [new path]" (like "nvm root c:nvm").
    (don't forget to close cmd, and open a new one.)

Everything should work without problems.

On a side note, I would like to help, but I don't know Go, so...

All 11 comments

The encoding fixed it for me as my name contains "ø".

fixed the issue for me! Thanks! (name contains "ß")

I changed to UTF-8 after,

C:\WINDOWS\system32>nvm arch
**There's a space. C:\Users\中文\nvm could not be found or does not exist. Exiting.
System Default: 64-bit.
Currently Configured: -bit.

this fails: C:\Users\Lucian Naie\AppData\Roamingnvm

@lnaie I think there is another issue regarding spaces or whitespace in the user name, please add your voice there.
@janjon Do your NVM_* environment variables have the correct values in them if you do a gci env: in a PowerShell window?

I think I have the same issue as my account has a period between my first and last names.

Problem is maintained with blanks

Please, solve the problem with blanks in the account name, thanks

@jose-vasquez-mantum - I would accept a Pull Request if someone fixes it.

If anyone is suffering from this, here's a suggestion:

  • type "nvm root" to know where is the nvm current path
  • In windows explorer, copy the contents of the previous path to a simpler path like "c:nvm".
  • In system variables, search for NVM_HOME and update its value to the new path.
  • Then type "nvm root [new path]" (like "nvm root c:nvm").
    (don't forget to close cmd, and open a new one.)

Everything should work without problems.

On a side note, I would like to help, but I don't know Go, so...

I also have a space in my Windows User folder, and @urbgimtam's work around worked for me.

Was this page helpful?
5 / 5 - 1 ratings

Related issues

David263 picture David263  ·  3Comments

AllainPL picture AllainPL  ·  7Comments

petrovicz picture petrovicz  ·  4Comments

SufyanParkar picture SufyanParkar  ·  4Comments

snerte picture snerte  ·  5Comments