needle: 2.9.0 breaks on Node.js 8
2.9.0, apparently due to #370, does not work on Node.js 8. This breaks my build on Debian 9 and Ubuntu 18.04.
node --version
v8.10.0
node
> var needle = require('needle');
undefined
> needle.get('http://www.google.com', function(error, response) {
... if (!error && response.statusCode == 200)
... console.log(response.body);
... });
PassThrough { ... }
> TypeError: Cannot read property 'apply' of undefined
If this was intentional, could the engines in package.json be updated and a major version bump be made?
(I am not using Needle myself, it appears to be pulled in as a dependency of sqlite3 → node-pre-gyp.)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 25 (13 by maintainers)
I didn’t push that commit to master since it would mess up the history, but you can find the version at npm.
I just pushed a
v2.9.1branch if you want to see the commit.“Coming up roses”, I think I’m going to put that in the readme, haha.
Excellent!
I also just opened a page on buymeacoffee!
https://www.buymeacoffee.com/tomaspollak
I think I have it working now (branch
pump-module). I’ll run a few more tests and merge in a while.It’s probably because of #370. I’ll check and fix it a minute.
Success! Our builds are green again (Debian 9, Ubuntu 16.04, Ubuntu 18.04). Thank you!
I see that you now have 2.9.1 tagged as
lateston npm. I think that could be changed back to 3.0.0 without breaking anything, if you prefer.Then again, it seems like the only difference between 3.0.0 and 2.9.1 is the version number, which confuses me a little – was there no API-breaking change after all? Not that it matters to me though, as I’m not using the Needle API, I’m just a down-down-downstream consumer.
Hmm, but that doesn’t help me, because it means that a package like
node-pre-gyp(my sub-dependency) that requires"needle": "^2.2.1"will remain broken. Could we have a 2.9.1 or 2.10.0 that is fixed (and does not have whatever breaking change it is that is implied by the major version bump to 3.0.0)? If nothing else, simply equal to 2.8.0 or to 2.9.0 with #370 reverted?