-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Can we report the node versions, in addition to the ABI version, on ABI mismatch? #27100
Comments
Note: while in theory module versions can remain the same between major's, it seems every one of 6, 8, 10, 11, 12 have different module ABI versions, so that can simplify the message, and also make it easier to just put the node.js version in parentheses after the ABI version. Or... perhaps list the node.js version in first place, with the module ABI version in parentheses after? So the info people are most likely to recognize is more prominent? |
Should be quite easy for the required module/Node.js version as that is known at compile time: Lines 501 to 511 in f9ddbb6
Line 118 in f9ddbb6
We could just as easily also include Line 65 in f9ddbb6
The mismatched module version being loaded, however, would require some sort of mapping to Node.js versions. Something like #24114 (but this would need to be embedded). But it could always be a module version we don't know of yet (i.e. someone compiles against a later version of Node.js (e.g. 13) and attempts to run on an earlier Node.js. |
Although if we include the Node.js version that might affect embedders like Electron? |
If #24114 lands, we could just add a link to it. |
I worry that for people whom the current text is not enough, a link to the registry might not be enough either, though a link to a specific section describing what is going on might be a reasonable enhancement, or even an alternative to displaying node versions in the message. I usually see this when people upgrade, so newer node would know the older modules version, but the opposite does happen, too. I'd be happy to backport new module versions as they are allocated into older node LTS lines so they "know" about newer module version values, though of course that wouldn't help people who aren't up to date on their LTS line. |
#24114 landed. shall i look? |
Sure, see what you can do. Maybe its impossible to make this clear enough, but a link to the registry, or perhaps a link to a page in the node docs that explains the problem in more detail and that then links to the registry, would help a bit. |
abi_version_registry doc is not there in nodejs docs. what are viable options now? shall i link github one? |
Maybe if the doc generation process processed the json into a nice table in one of the doc pages then a link to the docs would make sense, but until/unless someone does that, github is more likely to be up to date, so direct linking is a good idea. |
Can I work on this one? Thanks! |
Its not incredibly clear what can be done to improve the situation, but if you think you can, please give it a shot, you don't have to ask for permission! |
just fyi: the error message is the only method I have been able to find that provides details on the ABI version of a compiled module. I need to use it in order to try and determine/verify the versions provided via prebuild-install, and use a regex to parse the modules ABI version information out or the error message I realize that this is a poor substitute for an actual API to determine the ABI |
There doesn't seem much to do about this, so I'll close it |
I recently answered a question about this:
This is a pretty good error message, and it does say what people should do to fix the problem, but most people have no idea what module versions are, that they can be different for different release lines, or how to find out what release line a module version was associated with. This can confuse them. The person who asked me about the above thought the npm package they were using somehow just didn't support node 10.x.
It would take a (small) amount of extra tracking on our part, but I think it would be helpful if that message was enhanced to list the node.js major's that a module version could correspond to. It might help cut down the number of questions just a little bit more.
Is your feature request related to a problem? Please describe.
Please describe the problem you are trying to solve.
Describe the solution you'd like
Please describe the desired behavior.
Describe alternatives you've considered
Please describe alternative solutions or features you have considered.
The text was updated successfully, but these errors were encountered: