-
Notifications
You must be signed in to change notification settings - Fork 283
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
NAN compatibility issues when moving from Node 10 -> 12 -> 14 #2722
Comments
Try bool on;
if (!Nan::To<bool>(info[0]).To(&on)) {
// exception pending
} else if (on) {
// ...
} else {
// ....
} |
Spot on @bnoordhuis. That works perfectly across all 3 versions of Node. Thank you. PS: Any chance you know the upgrade path for
which produces
It's only a warning but figure if I can I should tidy it up too. |
You're probably looking for Local<Value> retval;
if (Nan::Call(callback, recv, 4, argv).To(&retval)) {
// ...
} else {
// exception pending
}
|
Thanks for all the help @bnoordhuis. That answers my question. |
I'm using an out of date nodejs module (the sspi-client) which has forced my project to be stuck on Node 10. I'd like to solve that by contributing a PR to this library. The error I see, if we move past Node 10, is
Looking into the issue the 0 arg BooleanValue function was removed. It was replaced by the
Context
versions as detailed in this issue.With this info in hand I forked and upgraded the module. That worked well for Node 12. However I ran into numerous issues running the modules tests and got side tracked / lost interest. Now with a renewed interest I got the tests to an okay (sort of) state. But I noticed that last time I only tried the stable release of Node (12). Assuming the latest, Node 14, would be fine I checked it out and ran an install. I saw the following error
Re-checking Node 12 I also see a warning
I was able to "fix" the code for Node 14 using
But that, in turn, causes errors with Node 10. e.g.
What is the correct upgrade path here?
The text was updated successfully, but these errors were encountered: