0

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.

Jackie
  • 21,969
  • 32
  • 147
  • 289

1 Answers1

0

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.

tttapa
  • 1,397
  • 12
  • 26
  • Thank you but I want to avoid using anything other than the newest code. This is due to other projects I am working with. – Jackie Apr 26 '20 at 00:57
  • @Jackie isn't 14.0.0 newer than 14.0.0-pre? 14.0.0 was released 5 days ago. Either way, it's clear that using pre-releases isn't supported by the build tool you're using, so you'll have to open an issue there. You could also use a different version for your other projects that require the pre-release. Install it in a folder that's not in your path, and only add it to your path when you're working on a project that requires it. – tttapa Apr 26 '20 at 09:07
  • Rt and actually after I built yesterday I am on 15-pre. I thought I might be able to do an include or link and link back to the source directory so it will find the headers but haven't figured it out yet. You are right it may take a change from the tool side but not sure yet. That was actually what I was looking for when I posted here but I will keep hacking. – Jackie Apr 26 '20 at 15:30