0

I installed node on my system. I also installed nvm. But when I am trying to use particular version, I am getting error as shown in image:

click on this to view image

Please help me with this.

Prithvi
  • 1
  • 2

1 Answers1

0

It's because there's a space in your username. To fix it, you may use old-DOS style. To get it, open command line, go to folder C:\Prithvi M and execute command for %I in (.) do echo %~sI

C:\Prithvi M>for %I in (.) do echo %~sI
C:\Users\PRITHV~1

Having it, you may update 'root' attribute in your settings.xml (by default it's in your %homepath%\AppData\Roaming\nvm), to the old DOS-style.

example:

 root: C:\Users\PRITHV~1\AppData\Roaming\nvm    

[1] Get DOS path instead of Windows path

greenmarker
  • 1,599
  • 1
  • 21
  • 29
  • I copied and pasted what you have told(root: C:\Users\PRITHV~1\AppData\Roaming\nvm) in settings.txt. But it is saying that the path mentioned does'nt exist. – Prithvi Jun 04 '20 at 08:32
  • In console, go to folder C:\Users\Prithvi M, and execute command: for %I in (.) do echo %~sI It will give you the exact DOS-style path – greenmarker Jun 04 '20 at 08:37
  • The command is showing the same original path.It isn't like any DOS style. – Prithvi Jun 04 '20 at 08:58
  • What is the result of `for %I in (.) do echo %~sI` on your computer? – greenmarker Jun 04 '20 at 09:45
  • C:\Users\Prithvi M>echo C:\Users\Prithvi M. Next line had again C:\Users\Prithvi M – Prithvi Jun 04 '20 at 10:07
  • Please, in command line, go to directory `C:\Users`. What returns command `dir /x` ? – greenmarker Jun 04 '20 at 11:33
  • List of directories are displayed( . , .. , Prithvi M, Public) with dir \x command. It is still not showing dos path – Prithvi Jun 05 '20 at 11:17
  • On the screenshot https://i.imgur.com/nHCTw1m.png, you can see "short name" of a folder **Prithvi M** in blue circle. If you don't see it, then you may have **8dot3 names** disabled. To enable it, follow: https://digitalsupport.ge.com/en_US/Article/Is-Windows-8-3-File-Naming-Enabled-How-Do-I-Enable-8-3-File-Naming-If-It-Is-Not – greenmarker Jun 05 '20 at 12:15