New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-26080] Fix ERR_INVALID_CALLBACK error on Android build and misc Node 10 fixes #10090
Conversation
android/package.json
Outdated
@@ -26,7 +26,7 @@ | |||
"android platform tools": "27.x", | |||
"android tools": "<=26.x", | |||
"android ndk": ">=r11c <=r16c", | |||
"node": ">=4.0 <=7.x", | |||
"node": ">=6.0 <=8.x", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we don't need <= 10.x
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left out on purpose as this PR doesn't introduce full Node 10 support. This + #10089 + some further testing and I'd feel comfortable claiming support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. I think it should be added and tested with this ticket, as it's all about Node 10 anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want me to cherry-pick your commit across to here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it a different change? My one only updated ioslib and it's compatibility, but I think the CLI will warn if the package.json in the iphone/android dir of the SDK are not updated as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ewanharris I've merged Hans' ioslib update PR after fixing ioslib/node-ios-device, so this can now be tested for Node 10 support.
Hmm it appears I'm wrong about the |
Related: tidev/node-appc#129 |
So I think the changes to the node version range should probably be rolled back if this change still does work on Node 4, and likely the top-level package.json should be updated to use node-appc 0.24.6 - then this PR can be merged. I think if do decide to bump our minimum Node support, it should be done in a separate PR explicitly with some attention to Brian to update the docs/support matrix. |
33d5f18
to
d485bc6
Compare
Bump minimum node version to 6 as that is the first time Buffer.from is available
Update to reinstate the node 4 compatibility with an update to latest node-appc and reverting the package.json changes |
Tests:
Generated by 🚫 dangerJS |
This PR contains two tickets as they are closely related, however the second commit has some consequences on our supported Node version, as
Buffer.from
is only available in Node 6+. We can easily ponyfill this using buffer-from but I chose to drop Node 4 for the following reasonsThat said, if anyone has differing opinions, I'm happy to rework fd207d0 to use the ponyfill
Tickets:
ERR_INVALID_CALLBACK
error when building a project with .aar files.new Buffer
usage(node:19383) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
DefaultIcon.png
has an alpha channel, here's one