I’m trying to build jQuery from source, and I’m running into an odd problem.
I can build the un-minified version, but when it tries to minify the js file, I get the following errors:
> make ... Building ./dist/jquery.js /bin/sh: line 0: test: /usr/bin/node: binary operator expected You must have NodeJS installed in order to minify jQuery. /bin/sh: line 0: test: /usr/bin/node: binary operator expected You must have NodeJS installed in order to test jQuery against JSHint. /bin/sh: line 0: test: /usr/bin/node: binary operator expected You must have NodeJS installed in order to size jQuery.
What’s weird, though, is that NodeJS is installed at /usr/bin/node. What’s going on here?
Check out one of the lines that generates the error:
Here’s where
${JS_ENGINE}is defined at the top ofMakefile:If I run that command on my system, here’s what I get:
Notice that the output contains 2 lines, not 1!
To fix this, override the
${JS_ENGINE}property when you invokemakelike so: