Replies: 1 comment
-
@DesNotMe cdxgen is even telling you to use the node20 container image to workaround this error! How cool is that? This is a known issue with the likes of apps such as dvna, juice-shop that purposefully use an old version of libxmljs which needs specific version of node.js and devel packages. They are also unlikely to build on macOS arm64. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
`mervyn.lee.int-MAC dvna-4 % cdxgen -r -o bom.json
Executing 'npm install' in /Users/mervyn.lee.int/dvna-4
npm install has failed. Generated SBOM will be empty or with a lower precision.
cdxgen has detected errors with the native build using node-gyp.
Try using the custom
ghcr.io/cyclonedx/cdxgen-node20:v11
container image with --platform=linux/amd64, which bundles node.js 20.npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated terraformer@1.0.12: terraformer is deprecated and no longer supported. Please use @terraformer/arcgis.
npm warn deprecated terraformer-wkt-parser@1.2.1: terraformer-wkt-parser is deprecated and no longer supported. Please use @terraformer/wkt.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated gauge@3.0.2: This package is no longer supported.
npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm warn deprecated express-fileupload@0.4.0: Please upgrade express-fileupload to version 1.1.8+ due to a security vulnerability with the parseNested option
npm warn deprecated sequelize@4.44.4: Please update to v6 or higher! A migration guide can be found here: https://sequelize.org/v6/manual/upgrade-to-v6.html
npm error code 1
npm error path /Users/mervyn.lee.int/dvna-4/node_modules/libxmljs
npm error command failed
npm error command sh -c node-pre-gyp install --fallback-to-build --loglevel http
npm error CXX(target) Release/obj.target/xmljs/src/libxmljs.o
npm error Failed to execute '/opt/homebrew/Cellar/node/23.6.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/mervyn.lee.int/dvna-4/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/mervyn.lee.int/dvna-4/node_modules/libxmljs/build/Release --napi_version=10 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v131' (1)
npm error (node:4925) [DEP0040] DeprecationWarning: The
punycode
module is deprecated. Please use a userland alternative instead.npm error (Use
node --trace-deprecation ...
to show where the warning was created)npm error node-pre-gyp http GET https://github.com/libxmljs/libxmljs/releases/download/v0.19.10/node-v131-darwin-arm64.tar.gz
npm error node-pre-gyp ERR! install response status 404 Not Found on https://github.com/libxmljs/libxmljs/releases/download/v0.19.10/node-v131-darwin-arm64.tar.gz
npm error node-pre-gyp WARN Pre-built binaries not installable for libxmljs@0.19.10 and node@23.6.0 (node-v131 ABI, unknown) (falling back to source compile with node-gyp)
npm error node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/libxmljs/libxmljs/releases/download/v0.19.10/node-v131-darwin-arm64.tar.gz
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@11.0.0
npm error gyp info using node@23.6.0 | darwin | arm64
npm error gyp info ok
npm error In file included from ../src/libxmljs.cc:3:
npm error In file included from /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8.h:23:
npm error In file included from /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/cppgc/common.h:8:
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8config.h:13:2: error: "C++20 or later required."
npm error 13 | #error "C++20 or later required."
npm error | ^
npm error In file included from ../src/libxmljs.cc:7:
npm error In file included from ../src/libxmljs.h:7:
npm error In file included from ../../nan/nan.h:176:
npm error ../../nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
npm error 55 | typedef v8::Localv8::AccessorSignature Sig;
npm error | ~~~~^
npm error In file included from ../src/libxmljs.cc:7:
npm error In file included from ../src/libxmljs.h:7:
npm error ../../nan/nan.h:202:12: error: no template named 'CopyablePersistentTraits' in namespace 'v8'; did you mean simply 'CopyablePersistentTraits'?
npm error 202 | public v8::CopyablePersistentTraits {};
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error | CopyablePersistentTraits
npm error ../../nan/nan.h:201:7: note: 'CopyablePersistentTraits' declared here
npm error 201 | class CopyablePersistentTraits :
npm error | ^
npm error ../../nan/nan.h:202:12: error: circular inheritance between 'v8::CopyablePersistentTraits' and 'CopyablePersistentTraits'
npm error 202 | public v8::CopyablePersistentTraits {};
npm error | ^
npm error ../../nan/nan.h:682:39: error: no member named 'IdleNotificationDeadline' in 'v8::Isolate'
npm error 682 | return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
npm error ../../nan/nan.h:2542:8: error: no member named 'SetAccessor' in 'v8::ObjectTemplate'
npm error 2542 | tpl->SetAccessor(
npm error | ~~~~~^
npm error ../../nan/nan.h:2586:15: error: no member named 'SetAccessor' in 'v8::Object'
npm error 2586 | return obj->SetAccessor(
npm error | ~~~~~^
npm error ../../nan/nan.h:2662:19: error: no matching constructor for initialization of 'v8::NamedPropertyHandlerConfiguration'
npm error 2662 | tpl->SetHandler(v8::NamedPropertyHandlerConfiguration(
npm error | ^
npm error 2663 | getter_, setter_, query_, deleter_, enumerator_, obj));
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:785:12: note: candidate constructor not viable: no known conversion from 'imp::NativePropertyGetter' (aka 'void ()(v8::Localv8::Name, const v8::PropertyCallbackInfov8::Value &)') to 'NamedPropertyGetterCallback' (aka 'Intercepted ()(Local, const PropertyCallbackInfo &)') for 1st argument
npm error 785 | explicit NamedPropertyHandlerConfiguration(
npm error | ^
npm error 786 | NamedPropertyGetterCallback getter,
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:803:3: note: candidate constructor not viable: no known conversion from 'imp::NativePropertyGetter' (aka 'void ()(v8::Localv8::Name, const v8::PropertyCallbackInfov8::Value &)') to 'NamedPropertyGetterCallback' (aka 'Intercepted ()(Local, const PropertyCallbackInfo &)') for 1st argument
npm error 803 | NamedPropertyHandlerConfiguration(
npm error | ^
npm error 804 | NamedPropertyGetterCallback getter, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:765:3: note: candidate constructor not viable: requires at least 7 arguments, but 6 were provided
npm error 765 | NamedPropertyHandlerConfiguration(
npm error | ^
npm error 766 | NamedPropertyGetterCallback getter, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 767 | NamedPropertySetterCallback setter, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 768 | NamedPropertyQueryCallback query, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 769 | NamedPropertyDeleterCallback deleter, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 770 | NamedPropertyEnumeratorCallback enumerator, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 771 | NamedPropertyDefinerCallback definer, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 772 | NamedPropertyDescriptorCallback descriptor, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 773 | Local data = Local(),
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 774 | PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:754:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 6 were provided
npm error 754 | struct NamedPropertyHandlerConfiguration {
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:754:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 6 were provided
npm error 754 | struct NamedPropertyHandlerConfiguration {
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error In file included from ../src/libxmljs.cc:7:
npm error In file included from ../src/libxmljs.h:7:
npm error ../../nan/nan.h:2732:19: error: no matching constructor for initialization of 'v8::IndexedPropertyHandlerConfiguration'
npm error 2732 | tpl->SetHandler(v8::IndexedPropertyHandlerConfiguration(
npm error | ^
npm error 2733 | getter_, setter_, query_, deleter_, enumerator_, obj));
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:864:12: note: candidate constructor not viable: no known conversion from 'imp::NativeIndexGetter' (aka 'void ()(unsigned int, const PropertyCallbackInfov8::Value &)') to 'IndexedPropertyGetterCallbackV2' (aka 'v8::Intercepted ()(unsigned int, const PropertyCallbackInfo &)') for 1st argument
npm error 864 | explicit IndexedPropertyHandlerConfiguration(
npm error | ^
npm error 865 | IndexedPropertyGetterCallbackV2 getter = nullptr,
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:882:3: note: candidate constructor not viable: no known conversion from 'imp::NativeIndexGetter' (aka 'void ()(unsigned int, const PropertyCallbackInfov8::Value &)') to 'IndexedPropertyGetterCallbackV2' (aka 'v8::Intercepted ()(unsigned int, const PropertyCallbackInfo &)') for 1st argument
npm error 882 | IndexedPropertyHandlerConfiguration(
npm error | ^
npm error 883 | IndexedPropertyGetterCallbackV2 getter,
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:844:3: note: candidate constructor not viable: requires at least 7 arguments, but 6 were provided
npm error 844 | IndexedPropertyHandlerConfiguration(
npm error | ^
npm error 845 | IndexedPropertyGetterCallbackV2 getter, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 846 | IndexedPropertySetterCallbackV2 setter, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 847 | IndexedPropertyQueryCallbackV2 query, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 848 | IndexedPropertyDeleterCallbackV2 deleter, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 849 | IndexedPropertyEnumeratorCallback enumerator, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 850 | IndexedPropertyDefinerCallbackV2 definer, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 851 | IndexedPropertyDescriptorCallbackV2 descriptor, //
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 852 | Local data = Local(),
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error 853 | PropertyHandlerFlags flags = PropertyHandlerFlags::kNone)
npm error | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:833:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 6 were provided
npm error 833 | struct IndexedPropertyHandlerConfiguration {
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-template.h:833:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 6 were provided
npm error 833 | struct IndexedPropertyHandlerConfiguration {
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error In file included from ../src/libxmljs.cc:3:
npm error In file included from /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8.h:24:
npm error In file included from /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-array-buffer.h:12:
npm error /Users/mervyn.lee.int/Library/Caches/node-gyp/23.6.0/include/node/v8-local-handle.h:267:19: error: static assertion failed due to requirement 'std::is_base_of<v8::Value, v8::Data>::value': type check
npm error 267 | static_assert(std::is_base_of<T, S>::value, "type check");
npm error | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm error ../../nan/nan_callbacks_12_inl.h:175:20: note: in instantiation of function template specialization 'v8::Localv8::Value::Localv8::Data' requested here
npm error 175 | cbinfo(info, obj->GetInternalField(kDataIndex));
npm error | ^
npm error 10 errors generated.
npm error make: *** [Release/obj.target/xmljs/src/libxmljs.o] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error:
make
failed with exit code: 2npm error gyp ERR! stack at ChildProcess. (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
npm error gyp ERR! System Darwin 23.6.0
npm error gyp ERR! command "/opt/homebrew/Cellar/node/23.6.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--loglevel=http" "--module=/Users/mervyn.lee.int/dvna-4/node_modules/libxmljs/build/Release/xmljs.node" "--module_name=xmljs" "--module_path=/Users/mervyn.lee.int/dvna-4/node_modules/libxmljs/build/Release" "--napi_version=10" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v131"
npm error gyp ERR! cwd /Users/mervyn.lee.int/dvna-4/node_modules/libxmljs
npm error gyp ERR! node -v v23.6.0
npm error gyp ERR! node-gyp -v v11.0.0
npm error gyp ERR! not ok
npm error node-pre-gyp ERR! build error
npm error node-pre-gyp ERR! stack Error: Failed to execute '/opt/homebrew/Cellar/node/23.6.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --loglevel=http --module=/Users/mervyn.lee.int/dvna-4/node_modules/libxmljs/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/mervyn.lee.int/dvna-4/node_modules/libxmljs/build/Release --napi_version=10 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v131' (1)
npm error node-pre-gyp ERR! stack at ChildProcess. (/Users/mervyn.lee.int/dvna-4/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:507:28)
npm error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1101:16)
npm error node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error node-pre-gyp ERR! System Darwin 23.6.0
npm error node-pre-gyp ERR! command "/opt/homebrew/Cellar/node/23.6.0/bin/node" "/Users/mervyn.lee.int/dvna-4/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http"
npm error node-pre-gyp ERR! cwd /Users/mervyn.lee.int/dvna-4/node_modules/libxmljs
npm error node-pre-gyp ERR! node -v v23.6.0
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok
npm error A complete log of this run can be found in: /Users/mervyn.lee.int/.npm/_logs/2025-01-10T01_39_08_748Z-debug-0.log`
Above is the issue i faced when trying to get started on cdxgen
Beta Was this translation helpful? Give feedback.
All reactions