Build with NODE_MODULE_VERSION 72, requires NODE_MODULE_VERSION 75, nodejavabridge_bindings
Getting the following error:
Error: The module '_<PROJECT_DIR>_/node_modules\java\build\Release\nodejavabridge_bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 75. Please try re-compiling or re-installing
I did try the following, with no luck:
node-gyp configure --target=$(node --version)
node-gyp rebuild
node-gyp clean
and
npm install
npm audit fix
npm test
This appears to have been a generated when a build directory was added to the project root. I am not sure when or how that was added through getting this to build.
This appears to be still an issue, even with no build directory in the root project.
Not entirely sure about your situation but I have seen this issue if you do npm install in one machine with a specific nodejs version then move the project entirely to a different machine with a different nodejs version. Make sure the build and run happens on the same nodejs version, that could be the culprit.
I have a similar issue updated to 2024
Using from a VSCode extension and failing when running it in debug mode:
Activating extension '...' failed: The module '\\?\c:\...\node_modules\node-jmx\node_modules\java\build\Release\nodejavabridge_bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 115. This version of Node.js requires
NODE_MODULE_VERSION 123. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`)..
I've tried to rebuild and reinstall with no luck