-
Notifications
You must be signed in to change notification settings - Fork 464
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
errors from node-addon-api on node 8.0.0 #760
Comments
I assume you set the define to set the Napi target to version 1. Did you check if doing so with later version ex 10.x compile ok? |
@mhdawson yeah I did. the problem is that napi v1 contains a lot of API changes between 8.0.0 and 8.7.0 (missing functions, signatures changing, etc). |
@devsnek I figured as much but thought I should check. I wonder if we should update the table to say that version 1 is there as of 8.7.0 as opposed to 8.0.0 with a note to explain while it was present in earlier versions it was changing as it was still experimental. |
@devsnek it probably does not solve your issue, but I'll open a PR to say the first version which supported the final version of 1 was 8.7.0 as that might avoid future confusion. |
@mhdawson that's definitely helpful 👍. if anything, this is more motivation for us to drop node 8 support 😅 I wonder if there's anything we can do in the c++ headers to detect this sort of situation and give a better error. |
@devsnek it might be easiest to just do a Node.js version check and warn/error if the request is for VERSION 1 and you are using less than 8.7.0 |
Refs: nodejs/node-addon-api#760 Clarify which version of 8.x in which N-API version 1 matches the shape in later versions like 10.x Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com>
@mhdawson seems reasonable |
Refs: nodejs/node-addon-api#760 Clarify which version of 8.x in which N-API version 1 matches the shape in later versions like 10.x Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: #34344 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
The documentation fix to address this issue has landed in core at nodejs/node#34344. |
Refs: nodejs/node-addon-api#760 Clarify which version of 8.x in which N-API version 1 matches the shape in later versions like 10.x Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: #34344 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
I'm not sure what to do with this. the version matrix (https://nodejs.org/api/n-api.html#n_api_n_api_version_matrix) says that napi v1 is present but experimental in 8.0.0. I guess that's not entirely correct?
The text was updated successfully, but these errors were encountered: