0

I have create virtual machine in azure cloud. Then I install 64 bit nodejs with msi. I am trying to run node js in powershell. I am getting following error.

How can I fix this?

PS C:\Program Files\nodejs>
PS C:\Program Files\nodejs> node
node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ node
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
David Makogon
  • 69,407
  • 21
  • 141
  • 189
onder
  • 795
  • 3
  • 14
  • 32

1 Answers1

1

Node was likely not set to be in your execution path by default. Try adding it to your path:

set PATH=%PATH%;C:\Program Files\nodejs

And then running it:

node

If that works go ahead and add it to your path permanently using setx.

Community
  • 1
  • 1
Aaron Silverman
  • 22,070
  • 21
  • 83
  • 103