I have been trying to resolve this issue for the whole day.
When I run node -v
or npm install
in cmd prompt, it works absolutely fine. But when I run the same commands in Powershell, it gives the following error:s
PS C:\Users\Anubhav.Trivedi> node -v
The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelli
ng of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:5
+ node <<<< -v
+ CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I tried uninstalling node js and reinstalling it. Added node js path C:\Program Files (x86)\nodejs\
to enviroment variables (system variables). Restarting computer. But nothing seems to work.
Kindly let me know, what am I missing here.
$env:path -split ';' | Select-String nodejs
Did you remember to restart the PowerShell console when you updated the Path environment variable? – Conrado