How do I use CMakeJS when Node is compile from source?

302 views Asked by At

I typically compile my NodeJS from source. I have recently started to try to integrate some C code using CMakeJS. On my Raspberry PI, everything compiles fine using...

node --version
v13.13.0

But when I try on my laptop with...

node --version
v14.0.0-pre

I get...

http DIST       - https://nodejs.org/dist/v14.0.0-pre/SHASUMS256.txt
http DIST       - https://nodejs.org/dist/v14.0.0-pre/node-v14.0.0-pre-headers.tar.gz
ERR! OMG Error: incorrect header check
ERR! OMG     at Zlib.zlibOnError [as onerror] (zlib.js:180:17)
ERR! OMG Error: incorrect header check
ERR! OMG     at Zlib.zlibOnError [as onerror] (zlib.js:180:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1

How do I get this to work with my locally compiled version?

Update

I tried this too But even though node -p process.release shows correctly it still trys to download from the url.

1

There are 1 answers

3
tttapa On

The files it's trying to download simply don't exist. It looks like the build tool is just substituting the output of node --version into the URL. You should probably report this as a bug with the maintainer of whatever piece of software started that download.

In the meantime, it's probably easiest to just use node v14.0.0 instead of the pre-release.