Closed chrispahm closed 5 years ago
Don't combine --all
with --napi
, because --all
selects all ABIs, while N-API is meant to be ABI-agnostic. With N-API you typically need only one prebuild (per platform, sometimes also per runtime).
Try either:
prebuildify --napi --strip
(to build against latest node and electron)prebuildify -t 8.14.0 --napi --strip
(build against a single node version, which will make a prebuild that also works in Electron 4+ in my experience)@ralphtheninja @mafintosh Maybe we should throw an informative error on --all --napi
? Or give precedence to one of them.
Hey @vweevers, Thanks for the clarification! I tried again using
prebuildify --napi --strip
and it succesfully build for the latest node version (12.0.0), but afterwards started to download the 5.0.0 version again and then failed at the second build.
Using the -t
flag with a single node version worked fine though.
afterwards started to download the 5.0.0 version again and then failed at the second build.
I see. So Electron@5 is the problem.
@chrispahm can you share the full log of prebuildify --napi --strip
without -t
(preferably as a gist)?
@vweevers thanks for following up. So I just logged on again after lunch, ran prebuildify --napi --strip
and it worked without any issue :) so sorry for the false bug report, and thanks again for the help!
This is essentially the same issue as https://github.com/prebuild/prebuildify/issues/28. The proposed fix, which is simply deleting the
~\.node-gyp
folder and trying to re-build afterwards, doesn't work for me though.I'm trying to build including the NAPI header files with the following command
which works perfectly fine on macOS. However, on Windows I get the following exception:
When I check the console output, I see that it keeps downloading header files for Node 5.0.0, which didn't include the NAPI yet.
Checking
points to the correct header url.
Does anyone have an idea of how this can be fixed? Thanks in advance!