Closed hsanjuan closed 7 years ago
+1
+1
you should use something like
#!/usr/bin/env node
instead of
#!node
ah, no this seems to be a end-of-line character issue!
This comment on another issue solved the problem quite nicely for me https://github.com/nwjs/nw-builder/issues/75#issuecomment-55108563
Open the executables in VIM and use
:set ff=unix
People suggesting solutions need to tell us what their environment is and which environments they have tested to ensure the solution is portable. There are people using just about every environment possible and we need a solution that works in every environment. If it breaks some other environment or breaks merges, we'll just get more bug reports.
But thanks, Mike, for the ": set ff=unix" workaround. That should work for some people who have the problem and just want to get their script working.
On Mon, Aug 17, 2015 at 11:38 AM, Brown Mike notifications@github.com wrote:
This comment on another issue solved the problem quite nicely for me nwjs/nw-builder#75 (comment) https://github.com/nwjs/nw-builder/issues/75#issuecomment-55108563
Open the executables in VIM and use
:set ff=unix
— Reply to this email directly or view it on GitHub https://github.com/cwjohan/markdown-to-html/issues/2#issuecomment-131920422 .
+1 I'm getting this on OS X Yosemite 10.10.5
>markdown
>node^M: bad interpreter: No such file or directory
>markdown --help
>node^M: bad interpreter: No such file or directory
+1 Getting it on OS X 10.9.5
$ markdown readme.md
-bash: /usr/local/opt/nvm/versions/node/v4.0.0/bin/markdown: node^M: bad interpreter: No such file or directory
Same issue with node v0.12.7 and v4.0.0
Same issue in Linux Mint. Would be awesome if it did :-)
+1 OS X Yosemite 10.10.5
+1, Linux
+1 OS X Yosemite 10.11.12
+1 OS X El Capitan 10.11.3
+1 OS X El Capitan 10.11.2
+1 archlinux
+1 Linux Mint 17.3 Cinnamon 64 bit
+1 OS X El Capitan 10.11 Beta (15A278b)
dos2unix script_name.js
done
+1 -- OS X El Capitan 10.11.5 (15F34)
+1 OS X EL Capitan 10.11.6(15G31)
$ github-markdown index.md
$ zsh: /usr/local/bin/github-markdown: bad interpreter: node^M: no such file or directory
+1 also on 10.11.6 (15G1004)
-bash: /Users/stevelombardi/.nvm/versions/node/v6.4.0/bin/markdown: node^M: bad interpreter: No such file or directory
Can you not add /usr/bin/env to your path?
On Tue, Sep 13, 2016 at 5:50 AM, Steve Lombardi notifications@github.com wrote:
+1 also on 10.11.6 (15G1004)
-bash: /Users/stevelombardi/.nvm/versions/node/v6.4.0/bin/markdown: node^M: bad interpreter: No such file or directory
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cwjohan/markdown-to-html/issues/2#issuecomment-246670859, or mute the thread https://github.com/notifications/unsubscribe-auth/AH5q3GTg36mjTHrB1IbH12v0rBG8eTigks5qppwxgaJpZM4E6Wjw .
+1 on Debian 8.5
There seems to be ample evidence that this problem will be fixed by accepting some of the open pull requests. I am pretty sure npm creates a wrapper batch script in Windows that calls the program with node
. Lots of bin scripts use #!/usr/bin/env node
and work fine on Windows.
OK. Done. We now are using "#!/usr/bin/env node".
Accepted user critiques. We now are using "#!/usr/bin/env node".
The interpreter is set to #!node when it should be to #!/usr/bin/env node
Additionally the npm-installed file for /usr/bin/markdown file is DOS encoded, which causes a "Wrong interpreter node^M" messages like: bash: /usr/bin/markdown: /usr/bin/node^M: bad interpreter: No such file or directory