Alex Rivera | Logout

sh.exe": node: command not found

Asked 2011-12-17T07:15:57.737
8

I'm trying to run a javascript file in Gitbash but getting this error.

$ node chrome-devtools-autosave-server/index.js
sh.exe": node: command not found

Screenshot

enter image description here

How to solve this?

My OS is Windows 7 (64 Bit)

Edit
Report

1 Answer

17

Node is not 'visible' in MINGW32 by default, only in the Windows Command Terminal. Same goes for npm.

How to add it (if you have Node installed), from the official MINGW FAQ:

MSYS uses a Bourne-like shell, hence you can change the PATH using the export command.
The easiest way to add something to the end of the PATH is with the command:

export PATH=$PATH:directory-to-add

So you have to add the directory where Node is installed (probably something like C:\Program Files\nodejs).

answered 2011-12-17T07:46:27.457

Your Answer