julianhille / MuhammaraJS

Muhammara a node module with c/cpp bindings to modify PDF with js for node or electron (based/replacement on/of galkhana/hummusjs)
Other
228 stars 46 forks source link

muhammara.node was compiled against a different Node.js version using #374

Open izdaezt opened 6 months ago

izdaezt commented 6 months ago

I am currently using Node.js version 20 and Electron version 29. When I declare a Recipe using the command: const Recipe = require("muhammara").Recipe; then I encounter the following error: _muhammara.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 93. This version of Node.js requires NODE_MODULEVERSION 121.

Please help me

depperm commented 6 months ago

I also experienced this, with different NODE_MODULE_VERSION (57, 93). I'll have to check but I believe this only happened to docker build, I think this worked while running locally.

This happened to me when upgrading node 9(something) to 16.15.0. We initially had hummus and thought switching to muhammara would fix it.

Maybe relevant info: node 16.15.0 npm 8.5.5 gcc 8.3.1

What I've tried to fix:

rm -rf node_modules
rm package-lock.json
npm cache clean -force
npm i
npm rebuild muhammara --update-binary

Nothing I've tried has worked

nitzan-blink commented 6 months ago

this has worked for me:

npm remove muhammara
npm install muhammara
julianhille commented 6 months ago

Make sure you install for your electron version and not for the node version or vice versa

julianhille commented 6 months ago

@depperm and for you, you need to make sure that you install "inside" of your docker container. You can not install on the host and then move the node_modules into the container which may has a different node version.

Or a different os/arch Default libc etc

julianhille commented 6 months ago

I am currently using Node.js version 20 and Electron version 29. When I declare a Recipe using the command: const Recipe = require("muhammara").Recipe; then I encounter the following error: _muhammara.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 93. This version of Node.js requires NODE_MODULEVERSION 121.

Please help me

have a read: https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules

gilliamwells commented 2 months ago

I too am experiencing issues with my local build on MacOS: The module '/node_modules/muhammara/binding/muhammara.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 93.

I tried everything mentioned above with no success.

Running Node 20.15.1 NPM 10.7.0

julianhille commented 2 months ago

I too am experiencing issues with my local build on MacOS: The module '/node_modules/muhammara/binding/muhammara.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 93.

I tried everything mentioned above with no success.

Running Node 20.15.1 NPM 10.7.0

please mind opening a new ticket. As the result and debugging is very very tightly coupled to your circumstances.