apple-pay-decrypt
apple-pay-decrypt copied to clipboard
npm i fails with build errors
Hi:
I am using Node v 12.16
npm install gives following build errors:
declarator __attribute__((deprecated(message)))
^
In file included from ../src/addon.cc:5:
In file included from ../include/x509.h:7:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
return v8::StringObject::New(value).As<v8::StringObject>();
~~~~~~~~~~~~~~~~~~~~~ ^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8.h:5531:3: note: 'New' declared here
static Local<Value> New(Isolate* isolate, Local<String> value);
^
In file included from ../src/addon.cc:5:
In file included from ../include/x509.h:7:
In file included from ../../nan/nan.h:2706:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
assert(persistent().IsNearDeath());
~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
In file included from ../src/addon.cc:5:
In file included from ../include/x509.h:7:
In file included from ../../nan/nan.h:2706:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
assert(wrap->handle_.IsNearDeath());
~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
../src/addon.cc:16:53: error: too few arguments to function call, single argument 'context' was not specified
Nan::New<FunctionTemplate>(verify)->GetFunction());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8.h:6126:3: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/addon.cc:20:59: error: too few arguments to function call, single argument 'context' was not specified
Nan::New<FunctionTemplate>(get_altnames)->GetFunction());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8.h:6126:3: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/addon.cc:23:58: error: too few arguments to function call, single argument 'context' was not specified
Nan::New<FunctionTemplate>(get_subject)->GetFunction());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8.h:6126:3: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/addon.cc:26:57: error: too few arguments to function call, single argument 'context' was not specified
Nan::New<FunctionTemplate>(get_issuer)->GetFunction());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8.h:6126:3: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
../src/addon.cc:29:57: error: too few arguments to function call, single argument 'context' was not specified
Nan::New<FunctionTemplate>(parse_cert)->GetFunction());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8.h:6126:3: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
^
/Users/raj/Library/Caches/node-gyp/12.16.2/include/node/v8config.h:368:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
^
2 warnings and 8 errors generated.
make: *** [Release/obj.target/x509/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/raj/cyg/node_modules/x509
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Users/raj/cyg/package.json'
npm WARN cyg No description
npm WARN cyg No repository field.
npm WARN cyg No README data
npm WARN cyg No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/raj/.npm/_logs/2020-12-04T16_40_19_840Z-debug.log
I see the problem is with the x509 dependency
its due to native build (node-gyp) issue of x509. for now resolve by downgrading to node v10.23 and installed it. since the binaries are built, i hope the node version can be updated to v12 or 14 since npm may not build those x509 native bindings once again.