You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
eslint broken when node built without openssl #5610
When building Node.js with configure --without-ssl, make lint and make test error out with:
bash-3.2$ make lint
./node tools/eslint/bin/eslint.js benchmark lib src test tools/doc \
tools/eslint-rules --rulesdir tools/eslint-rules
crypto.js:17
throw new Error('Node.js is not compiled with openssl crypto support');
^
Error: Node.js is not compiled with openssl crypto support
at crypto.js:17:9
at NativeModule.compile (node.js:956:5)
at Function.NativeModule.require (node.js:900:18)
at Function.Module._load (module.js:299:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/Users/james/Node/main/node/tools/eslint/lib/cli-engine.js:40:14)
at Module._compile (module.js:417:34)
at Object.Module._extensions..js (module.js:426:10)
at Module.load (module.js:357:32)
make: *** [jslint] Error 1
I don't think we can make an assumption about a global node.
They seem to use md5 from crypto:
/** * create a md5Hash of a given string * @param {string} str the string to calculate the hash for * @returns {string} the calculated hash */functionmd5Hash(str){returncrypto.createHash("md5").update(str,"utf8").digest("hex");}
Perhaps just file a PR upstream with a javascript version of md5?
@Fishrock123 the idea is that node compiled without OpenSSL is kind of broken: a lot of modules won't work. We can make eslint work by sticking js implementation of md5, but it is not a good long term solution:
updates (including dependencies) can break it again
./node can be broken in many other ways that could prevent eslint and other tools from running correctly
@jbergstroem it's broken in a sense that it's not "node" platform, it's "node-without-ssl" platform, and eslint doesn't support running on "node-without-ssl". Using js implementation of md5 is not going to change that.
FWIW, in CI we run nodejs from FreeBSD's pkg. I'd still argue that the tradeoff for eslint to support non-ssl nodejs is so small they (I) should patch (PR) it.
Activity
vkurchatkin commentedon Mar 8, 2016
Why do we use
./nodeto run it? It can be broken at any point, doesn't it make sense to use globalnodewhich is known to be stable?jasnell commentedon Mar 8, 2016
That would assume that the machine has a global node installed, which may not be the case.
jbergstroem commentedon Mar 9, 2016
I don't think we can make an assumption about a global node.
They seem to use md5 from crypto:
Perhaps just file a PR upstream with a javascript version of md5?
vkurchatkin commentedon Mar 9, 2016
@jasnell it should be a requirement, then.
Fishrock123 commentedon Mar 9, 2016
@vkurchatkin I disagree, everything else works without a global node and iirc that is how the CI runs. We should attempt to make it run without that.
vkurchatkin commentedon Mar 9, 2016
@Fishrock123 the idea is that node compiled without OpenSSL is kind of broken: a lot of modules won't work. We can make eslint work by sticking js implementation of md5, but it is not a good long term solution:
./nodecan be broken in many other ways that could preventeslintand other tools from running correctlyjbergstroem commentedon Mar 9, 2016
@vkurchatkin if its broken we shouldn't support it.
The test suite currently passes (albeit with skipped crypto tests) and I don't think we should remove that build option.
vkurchatkin commentedon Mar 9, 2016
@jbergstroem it's broken in a sense that it's not "node" platform, it's "node-without-ssl" platform, and
eslintdoesn't support running on "node-without-ssl". Using js implementation of md5 is not going to change that.jbergstroem commentedon Mar 9, 2016
@vkurchatkin ok;
lib/cli-enginewas the only occurrence I could find. Got more info about eslint not supporting being run on "node-without-ssl"?vkurchatkin commentedon Mar 9, 2016
@jbergstroem by supporting "node-without-ssl" I mean running tests on it as a part of CI. It's very unlikely that they would do this (nobody does)
jasnell commentedon Mar 9, 2016
The other option here is to simply disable
make lintand linting duringmake testwhen openssl is not available.jbergstroem commentedon Mar 9, 2016
FWIW, in CI we run nodejs from FreeBSD's
pkg. I'd still argue that the tradeoff for eslint to support non-ssl nodejs is so small they (I) should patch (PR) it.jbergstroem commentedon Apr 12, 2016
Fixed with #6132.