nvm-windows icon indicating copy to clipboard operation
nvm-windows copied to clipboard

cmdlet the path is not found

Open webspecialist opened this issue 7 years ago • 7 comments

I have already install the latest version 1.1.6 I have windows 8.1 with powershell (also checked with classic cmd)

I am trying to see my version: When I type node -v or npm -v it says: "The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program."

I tried the nvm on and the nvm use v6.11.5 Also I tried to restart cmd and windows.

What can I do?

webspecialist avatar Jul 03 '18 19:07 webspecialist

This happened to me when I previously had node installed, then removed it, but it kept some files in c:\Program Files\nodejs The solution was to run rmdir /s /q "c:\program files\nodejs" then nvm use 10.6.0

Now your c:\program files will look like: 08/07/2018 09:51 PM <SYMLINKD> nodejs [C:\Users\Rik\AppData\Roaming\nvm\v10.6.0]

and all will work well

riklarkin avatar Jul 08 '18 13:07 riklarkin

Thanks @riklarkin that helped me just now!

ghost avatar Jul 26 '18 15:07 ghost

$ rmdir /s /q "c:\program files\nodejs"
Remove-Item : A positional parameter cannot be found that accepts argument '/q'.
At line:1 char:1
+ rmdir /s /q "c:\program files\nodejs"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Remove-Item], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

I had to $ Remove-Item -Force -Recurse "C:\Program Files\nodejs" instead, but then it worked for me too! 👍

NathanUrwin avatar Aug 10 '18 12:08 NathanUrwin

Try running node64 -v or node64==32 -v.

I found that the node executable in the NVM folder was named node64.exe, which also broke npm commands. Renaming that file to node.exe resolved the issue for me.

eloisetaylor5693 avatar Sep 25 '18 08:09 eloisetaylor5693

Oh man what a irritating error without any error message. Reading tons of issues to find the solution here. If you have ever installed (and uninstalled) node.js, the path always remains. So this failure should occur very often.

Perhelion avatar Feb 13 '20 17:02 Perhelion

This happened to me when I previously had node installed, then removed it, but it kept some files in c:\Program Files\nodejs The solution was to run rmdir /s /q "c:\program files\nodejs" then nvm use 10.6.0

Now your c:\program files will look like: 08/07/2018 09:51 PM nodejs [C:\Users\Rik\AppData\Roaming\nvm\v10.6.0]

and all will work well

nice,it works!

fgmn avatar Mar 17 '23 11:03 fgmn