galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.15k stars 170 forks source link

Preferred Node ande NPM versions for Hummus #145

Closed cenjennifer closed 7 years ago

cenjennifer commented 7 years ago

Hi - I'm running on node v6.5.0 and npm 3.10.3. I was wondering if you can tell me what's the most suitable versions for your library. Another team member with the same versions ran into the following errors, but resolved it by upgrading the node version to 7.5.

Error: Module version mismatch. Expected 48, got 51

So, just wondering if their is a preferred version for this library. Thanks!

galkahana commented 7 years ago

I have absoutely no idea. So whichever works is good.

jillmolloy commented 7 years ago

I've tried about 3/4 versions of node and I'm still getting a mismatch error similar to that listed by @cenjennifer

Error: Module version mismatch. Expected 50, got 51. for v7.0.0

I've tried v7.5.0, v7.6.0, v6.9.3 also – still no luck

galkahana commented 7 years ago

i'll look for something. sounds like a node-pre-gyp issue. in the meantime. use npm install hummus --build-from-source. i think that it should sort things out.

galkahana commented 7 years ago

k. let's try to recreate this. i'll need operating system info. node version you already provided. and do try npm install hummus --build-from-source and let me know if it changes anything.

cenjennifer commented 7 years ago

@jillmolloy - Have you tried removing all your node modules and uninstalling node and reinstalling node and then your node modules? That seem to have solved that mismatch issue.

jillmolloy commented 7 years ago

@cenjennifer – yes, tried removing and reinstalling

I'm actually running this in Electron, which I realized actually uses it's own version of Node, not whatever is installed on your system. So, I believe that Hummus was compiling against my system version and then complaining when I tried to run it with Electron that the versions didn't match.

I recompiled my node_modules based on the answers here using the build version of Electron that I'm running and it seems to be working correctly now.

npm rebuild --runtime=electron --target=1.4.15 --disturl=https://atom.io/download/atom-shell --build-from-source

So, not sure if this is actually an issue with Hummus at all, and more and environment issue, but maybe the above will be helpful to someone else.

For reference, I'm on a Mac, OS v10.12.3 and the Node version in use by Electron is v6.5.0, Electron v1.4.15

Thanks for the suggestions and the great module, @galkahana

galkahana commented 7 years ago

Cheers. i saw a couple of complaints like this in Electron (now i know what it is). seems like this issue fairly correlates with using Electron, and what is explained here is the way to go about this.

gonna close.

chunyenHuang commented 7 years ago

I have the same issue when building hummus in node 7.8.0. However, I solve it by building against node 6.

node-pre-gyp install --fallback-to-build --target=6.9.0
node-pre-gyp rebuild --target=6.9.0