Nvm-windows: It Fails with nvm use <installed_node_version>

Created on 12 May 2019  Â·  16Comments  Â·  Source: coreybutler/nvm-windows

Issue

Hello? Does anyone know it?
I met problem when I installed nvm successful , nvm -v: Running version 1.1.7.
then I use command : nvm use
It fails with:
fork/exec C:\Users\\AppData\Roaming\nvm\elevate.cmd: The system cannot find the file specified.

My Environment

  • [ ] Windows 7 (x64)

I have already re-install nvm many times, but it stay the same.......

1.nodejs is completely uninstall from windows
2.there is no spaces in pathname

Most helpful comment

@coreybutler could you release a new version since this is already fixed in master?

All 16 comments

  • Are you running as Administrator?
  • What shell/CLI are you using?
  • Are you running as Administrator?
  • What shell/CLI are you using?
  1. yes,there is only one Administrator in my Windows.
  2. windows/system32/cmd.exe

have tried many times, but……
Does anyone meet the same problem?

Does anyone meet the same problem?

:( Sorry, I haven't seen the problem you described. Sometimes I have had to manually remove and reinstall a particular version of nodejs though (as if nvm didn't install it properly or something)

Does anyone meet the same problem?

:( Sorry, I haven't seen the problem you described. Sometimes I have had to manually remove and reinstall a particular version of nodejs though (as if nvm didn't install it properly or something)

Ok, maybe I have to give up nvm. Thanks for your replay! :)

I am facing almost the same issue:
image

@hussnainsheikh What OS and build version are you using?

Looks like you are using Git Bash (mingw32). I have had problems with "nvm
use" not being able to make the symlink in that shell, but it always works
with elevated cmd.exe for me.

On Fri, May 24, 2019, 4:26 PM Sheikh Hussnain notifications@github.com
wrote:

I am facing almost the same issue:
[image: image]
https://user-images.githubusercontent.com/20900683/58357461-5b16ef00-7e94-11e9-9e76-d1060bb8c640.png

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/coreybutler/nvm-windows/issues/438?email_source=notifications&email_token=AAMOZMYU3L2JIBDPSWLESMDPXBMO5A5CNFSM4HMJ4SEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGTBXA#issuecomment-495792348,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMOZM43HAXUZMVPW76QRF3PXBMO5ANCNFSM4HMJ4SEA
.

It's caused by the space in the path (the one in your user account name). I have the same issue.

Edit: Actually it looks like the source has already been fixed. An actual release just hasn't been created.

Release 1.1.7

cmd := exec.Command(filepath.Join(env.root, "elevate.cmd"), "cmd", "/C", "rmdir", filepath.Clean(env.symlink))

Master branch

// Create new symlink
  if !runElevated(fmt.Sprintf(`"%s" cmd /C mklink /D "%s" "%s"`,
    filepath.Join(env.root, "elevate.cmd"),
    filepath.Clean(env.symlink),
    filepath.Join(env.root, "v"+version))) {
    return
  }

In the 1.1.7 version the path to the elevate.cmd file isn't being quoted. Thus creating the space issue.

I have also tried with cmd but it is not working:

image

Looks like you are using Git Bash (mingw32). I have had problems with "nvm use" not being able to make the symlink in that shell, but it always works with elevated cmd.exe for me.
…
On Fri, May 24, 2019, 4:26 PM Sheikh Hussnain @.*> wrote: I am facing almost the same issue: [image: image] https://user-images.githubusercontent.com/20900683/58357461-5b16ef00-7e94-11e9-9e76-d1060bb8c640.png — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#438?email_source=notifications&email_token=AAMOZMYU3L2JIBDPSWLESMDPXBMO5A5CNFSM4HMJ4SEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGTBXA#issuecomment-495792348>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMOZM43HAXUZMVPW76QRF3PXBMO5ANCNFSM4HMJ4SEA .

It's caused by the space in the path (the one in your user account name). I have the same issue.

Edit: Actually it looks like the source has already been fixed. An actual release just hasn't been created.

Release 1.1.7

cmd := exec.Command(filepath.Join(env.root, "elevate.cmd"), "cmd", "/C", "rmdir", filepath.Clean(env.symlink))

Master branch

// Create new symlink
  if !runElevated(fmt.Sprintf(`"%s" cmd /C mklink /D "%s" "%s"`,
    filepath.Join(env.root, "elevate.cmd"),
    filepath.Clean(env.symlink),
    filepath.Join(env.root, "v"+version))) {
    return
  }

In the 1.1.7 version the path to the elevate.cmd file isn't being quoted. Thus creating the space issue.

Could you please help to fix it?

Same if node installed in "Program files", need to manually set target by symlink properties - would love the fix released :)

@coreybutler could you release a new version since this is already fixed in master?

It is fixed in the new version

I'm having the same issue, my OS username is Fouad's HP, so the error I'm getting is
C:\Users\Fouad's HP>nvm use 10.16.3
exit status 1: 'C:\Users\Fouad's' is not recognized as an internal or external command, operable program or batch file.

  • Are you running as Administrator?
  • What shell/CLI are you using?
  1. yes,there is only one Administrator in my Windows.
  2. windows/system32/cmd.exe

have tried many times, but……
Does anyone meet the same problem?

I'm too facing the same problem

It is fixed in the new version

Which new version? The original issue was report in 1.1.7 which appears to still be the latest (and it still has the issue) as I just encountered it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thany picture thany  Â·  4Comments

eliavmaman picture eliavmaman  Â·  6Comments

webspecialist picture webspecialist  Â·  5Comments

Pomax picture Pomax  Â·  3Comments

janpio picture janpio  Â·  3Comments