admin管理员组文章数量:1205433
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)
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)
Share Improve this question edited Dec 17, 2011 at 7:48 manojlds 301k65 gold badges481 silver badges426 bronze badges asked Dec 17, 2011 at 7:15 Jitendra VyasJitendra Vyas 153k238 gold badges585 silver badges866 bronze badges 5- 1 perhaps index.js contains something tring to use "sh.exe" - can you post the relevant part of that code ? – Yahia Commented Dec 17, 2011 at 7:18
- 1 What happens if you run a command that's certainly not there? Same error message, or another? – Chris Morgan Commented Dec 17, 2011 at 7:26
- @Yahia - I'm trying to use this plugin github.com/NV/chrome-devtools-autosave/blob/master/README.mdown – Jitendra Vyas Commented Dec 17, 2011 at 7:35
- Nothing to do with git. Removed tag. – manojlds Commented Dec 17, 2011 at 7:48
- 1 @JitendraVyas I don't think that this is meant to be used with Windows... you wil have to setup some unix-like environment (mingw / cygwin / whatever...) and then try it... – Yahia Commented Dec 17, 2011 at 8:21
3 Answers
Reset to default 17Node 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"
For me, I am using the Git Bash Shell, and what I had to do to add the bin file to my PATH variable is use this syntax:
export PATH=$PATH:"c/bin/node"
You would think that it would be
export PATH=$PATH:"C:\bin\node"
but that wasn't working for me. Hope this helps others that are running into the same issue.
本文标签: javascriptshexequot node command not foundStack Overflow
版权声明:本文标题:javascript - sh.exe": node: command not found - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738701613a2107694.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论