static assertion failed due to requirement 'std::is_base_of'

172 views
Skip to first unread message

Zhihong Yu

unread,
Feb 24, 2024, 4:28:43 PMFeb 24
to v8-users
This is my OS:

Darwin ted.yu-G26RVPYM24 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020 arm64

With node v21.6.0, I get the following error with `npm install`:

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/segfault-handler.cc:3:9: warning: '__V8__' macro redefined [-Wmacro-redefined]
npm ERR! #define __V8__
npm ERR!         ^
npm ERR! <command line>:9:9: note: previous definition is here
npm ERR! #define __V8__ 1
npm ERR!         ^
npm ERR! In file included from ../src/segfault-handler.cc:1:
npm ERR! In file included from ../../nan/nan.h:60:
npm ERR! In file included from /Users/ted.yu/Library/Caches/node-gyp/21.6.0/include/node/node.h:73:
npm ERR! In file included from /Users/ted.yu/Library/Caches/node-gyp/21.6.0/include/node/v8.h:24:
npm ERR! In file included from /Users/ted.yu/Library/Caches/node-gyp/21.6.0/include/node/v8-array-buffer.h:12:
npm ERR! /Users/ted.yu/Library/Caches/node-gyp/21.6.0/include/node/v8-local-handle.h:253:5: error: static assertion failed due to requirement 'std::is_base_of<v8::Value, v8::Data>::value': type check
npm ERR!     static_assert(std::is_base_of<T, S>::value, "type check");
npm ERR!     ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_callbacks_12_inl.h:175:20: note: in instantiation of function template specialization 'v8::Local<v8::Value>::Local<v8::Data>' requested here
npm ERR!       cbinfo(info, obj->GetInternalField(kDataIndex));
npm ERR!                    ^
npm ERR! 1 warning and 1 error generated.
npm ERR! make: *** [Release/obj.target/NodeSegfaultHandler/src/segfault-handler.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Darwin 23.3.0

If someone has seen similar error, how do you get around it ?

Thanks
Reply all
Reply to author
Forward
0 new messages