Error when trying to install nodejs with nvm.

AzureAD+OrhunGökhan@WinMINGW64 ~
$ nvm install 14.17.0
C:\Users\OrhunGökhan\AppData\Roaming\nvm could not be found or does not exist. Exiting.
Downloading node.js version 14.17.0 (64-bit)...
Error while creating C:\Users\OrhunGâ–’khan\AppData\Roaming\nvm\v14.17.0\node64.exe - open C:\Users\OrhunGâ–’khan\AppData\Roaming\nvm\v14.17.0\node64.exe: The system cannot find the path specified.
Could not download node.js v14.17.0 64-bit executable.

This is caused by a special character or a space in your username. Since my computer is managed by Azure, I am not able to change it. This is also the reason why I never put special characters in files and directories.


Set the nvm root command line
Set the nvm root using double quotes.

AzureAD+OrhunGökhan@Win MINGW64 ~
$ nvm root "C:\Users\OrhunGökhan\AppData\Roaming\nvm"

Now doing a nvm install

AzureAD+OrhunGökhan@Win MINGW64 ~
$ nvm install 14.17.0
Downloading node.js version 14.17.0 (64-bit)...
Creating C:\Users\OrhunGökhan\AppData\Roaming\nvm\temp

Downloading npm version 6.14.13... Complete
Installing npm v6.14.13...

Installation complete. If you want to use this version, type

nvm use 14.17.0

If you get a `exit status 1: Access is denied`, then you need to run the terminal as Administrator.