Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmdlet the path is not found #366

Open
webspecialist opened this issue Jul 3, 2018 · 6 comments
Open

cmdlet the path is not found #366

webspecialist opened this issue Jul 3, 2018 · 6 comments

Comments

@webspecialist
Copy link

webspecialist commented Jul 3, 2018

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?

@riklarkin
Copy link

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

@ghost
Copy link

ghost commented Jul 26, 2018

Thanks @riklarkin that helped me just now!

@NathanUrwin
Copy link

$ 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! 👍

@eloisetaylor5693
Copy link

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.

@Perhelion
Copy link

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.

@fgmn
Copy link

fgmn commented Mar 17, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants