neocotic / europa

Library for converting HTML into valid Markdown
MIT License
159 stars 24 forks source link

Error: "coffee: command not found" / Windows (non-Cygwin) #12

Closed skopp closed 11 years ago

skopp commented 11 years ago

Granted, Windows can be tricky, but I think this is fairly trivial. Just not sure as to how to sym-link the "coffee" command to the correct place in $PATH.

The error returned is:

...npm/md:: line 12: coffee: command not found

I tracked down the offending file as this bugger (aptly and acutely named md ):

#!/bin/sh basedir=dirname "$0"

caseunamein *CYGWIN*) basedir=cygpath -w "$basedir";; esac

if [ -x "$basedir/coffee" ]; then "$basedir/coffee" "$basedir/node_modules/html-md/bin/md" "$@" ret=$? else coffee "$basedir/node_modules/html-md/bin/md" "$@"

This ↑ seems to be line 12

ret=$? fi exit $ret

ST2 opens it as a markdown file, but it looks like coffeescript or php or perl or js or the bastard child of all of them. I will try on my side, in my fork to rewire something (and check my local env too - it could be corrupted somewhere, somehow). Also, will test on some Linuxes.

At time of error output instance,

skopp commented 11 years ago

Looking at the log in CLI, it seemed to be sailing smooth until:

npm http 200 https://registry.npmjs.org/bindings npm http GET https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz contextify@0.1.3 install x:\Users\xxx\AppData\yyy\npm\node_modules\html-m d\node_modules\jsdom\node_modules\contextify node-gyp rebuild path_to:\Users\xxx\AppData\yyy\npm\node_modules\html-md\node_modules\jsdom\node_m odules\contextify>node "p:...\nodejs\node_modules\npm\bin\node-gyp-bi n....\node_modules\node-gyp\bin\node-gyp.js" rebuild gyp http GET http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz gyp http 200 http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz gyp http GET http://nodejs.org/dist/v0.8.16/node.lib gyp http GET http://nodejs.org/dist/v0.8.16/x64/node.lib gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: getaddrinfo ENOENT gyp ERR! stack at errnoException (dns.js:31:11) gyp ERR! stack at Object.onanswer as oncomplete gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "....\nodejs\node_modules\npm\node_modu les\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd pathto:......npm\node_modules\html-md\node_modules \jsdom\node_modules\contextify gyp ERR! node -v v0.8.16 gyp ERR! node-gyp -v v0.7.3 gyp ERR! not ok npm WARN optional dep failed, continuing contextify@0.1.3

neocotic commented 11 years ago

The next version will include the updated version of jsdom. This has a lot of improvements but still requires some special considerations for Windows devs: https://github.com/tmpvar/jsdom#contextify

However, since this is not specifically an issue for this project I'll be closing this issue. I'm taking every precaution within my code to be Windows-compatible, but if a dependencies dependency requires some additional preparation for devs, there isn't much more I can do. That said; I may mention this issue in README.md, much like jsdom have.