node-x509 icon indicating copy to clipboard operation
node-x509 copied to clipboard

Issue building with node 10.0.0?

Open Ubunfu opened this issue 6 years ago • 2 comments

After upgrading to node 10.0.0, I had some issues installing x509. node-gyp 'make' was failing with some errors that seemed indicative of some kind of breaking interface change. However this is not the analysis of an expert in such things :) Downgrading node to 9.5.0 (or 9.11.1) fixes the issue without any further action needed. If this is actually an issue with node, or node-gyp, or my own environment, please accept my apologies and close this issue! 10.0.0_build.log

Ubunfu avatar May 08 '18 02:05 Ubunfu

I have the exact same issue (node 10 via nvm). From a cursory scan over the output, it looks like something in x509 is using features which were deprecated in node 9 and removed in node 10:

../../nan/nan_maybe_43_inl.h:112:15: warning: 'ForceSet' is deprecated [-Wdeprecated-declarations]
  return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
              ^
/Users/craign04/.node-gyp/9.9.0/include/node/v8.h:3164:3: note: 'ForceSet' has been explicitly marked deprecated here
  V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
  ^
/Users/craign04/.node-gyp/9.9.0/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))

Looks like it might be the version of nan perhaps? (i'm not very familiar with nan in any detail).

Downgrading to node 9 works but there are warnings WRT deprecations.

Happy to take a look it that's helpful.

Update: It's not nan (although the version of nan in this package is older than current). It's some issues in the C code, similar to this https://stackoverflow.com/questions/45639996/c-error-member-access-into-incomplete-type-in-base-class-virtual-function

neilstuartcraig avatar May 16 '18 10:05 neilstuartcraig

For Nodejs v10+, you can use my fork: https://github.com/stormwin/node-x509

stormwin avatar Jun 17 '18 22:06 stormwin