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
How to solve this?
My OS is Windows 7 (64 Bit)
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).
You are missing double quotes for path varible
export PATH=$PATH:"C:\Program Files\nodejs"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With