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
  • 64,809
  • 21
  • 130
  • 175
onder
  • 765
  • 3
  • 12
  • 30

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
Zugwalt
  • 19,935
  • 20
  • 77
  • 99