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?
This happened to me when I previously had node installed, then removed it, but it kept some files in c:Program Filesnodejs
The solution was to run
rmdir /s /q "c:program filesnodejs"
then nvm use 10.6.0
Now your c:program files will look like:
08/07/2018 09:51 PM
and all will work well
Thanks @riklarkin that helped me just now!
$ 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! 馃憤
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.
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.
Most helpful comment
This happened to me when I previously had node installed, then removed it, but it kept some files in c:Program Filesnodejs
The solution was to run
rmdir /s /q "c:program filesnodejs"
then nvm use 10.6.0
Now your c:program files will look like: nodejs [C:UsersRikAppDataRoamingnvmv10.6.0]
08/07/2018 09:51 PM
and all will work well