request: Regression: Hawk update broke compatibility with Node 6.10
For some reason that I don’t quite understand, npm in Node6 completely ignores the fact that sntp package.json has "node": ">=8.9.0" in it and installs this very version as a dependency of updated hawk. 30 minutes ago you updated request and my app has completely gone out of production with SyntaxError: exports.time = async function (options = {} ) {
The problem is, I don’t install request directly, it is installed as a dependency of another package I have no control over. And it requires "request": "^2.53.0". Also I cannot change node version, since 6.10 is the latest available in AWS Lambda.
I really have no idea how to fix this on my end. Please help…
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 70
- Comments: 30 (4 by maintainers)
Commits related to this issue
- chore(pkg): request 2.85.0, https://github.com/request/request/issues/2891 — committed to localnerve/html-snapshots by localnerve 6 years ago
v2.85.0 is published
I’ve reverted the update to Hawk 7.x and hopefully this is going to fix the issue, because right now the tests on TravisCI are failing for Node >= v8 for some reason, the tests for Node < v8 are failing because of sntp dev dep, and locally the test are failing for yet another reason … Anyway will publish a new version shortly.
The first goal would be to get our tests working again. I guess that’s the reason why this got merged in without anyone noticing it.
Then
hawkshould not be updated to > v7 anytime soon, because of the breaking change for Node < 8.9.0. It was excluded from Greenkeeper long time ago, exactly because of the constant breaking changes: https://github.com/request/request/blob/v2.85.0/package.json#L82-L87 it was for Node < v4 at that timeFor reasons why we won’t/can’t bump the major version here, you can read @mikeal’s comments about it in this issue tracker.
Thanks for your patience! 👍
Thank you for the quick response/fix. It works again. 👍 💯 Maybe you could consider to introduce such a
breaking changeas amajorupdate instead of aminor? I guess it would be less ‘stressy’ for all of us. 😅Same error for firebase cloud functions
Fixed by locking version at
"request": "2.83.0".This has happened to us also. We’re using Jest, which pulls in this module, so as of an hour ago all our builds are now broken. We’re also working with AWS Lambda so have to target Node 6.
Given how many other people are likely in the same situation this could break a lot of things!
+1 Getting this too
same here, installing
jest@21withyarn@1.3.2=> broken CI