🐛 Bug Report: yarn install fails for node v22
📜 Description
Apologies if this has been raised before, I took a search through issues and couldn't see anything/
Pre-requisites states must use a node active LTS release, implying support for node v22 (LTS release 2024-10-29)
When running yarn install in isolation or npx @backstage/create-app@latest with node 22 active, the install fails
👍 Expected behavior
Install succeeds
👎 Actual Behavior with Screenshots
Yarn install fails
YN0009: │ isolated-vm@npm:4.7.2 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/xy/ch210qlj7h5cbkwj072906c00000gp/T/xfs-f475a0ad/build.log)
👟 Reproduction steps
- Use node v22
- npx @backstage/create-app@latest
📃 Provide the context for the Bug.
# This file contains the result of Yarn building a package (isolated-vm@npm:4.7.2)
# Script name: install
prebuild-install warn install No prebuilt binaries found (target=22.11.0 runtime=node arch=arm64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp info find Python using Python version 3.12.7 found at "/Users/tim.knight1/.pyenv/versions/3.12.7/bin/python3"
gyp info spawn /Users/tim.knight1/.pyenv/versions/3.12.7/bin/python3
gyp info spawn args [
gyp info spawn args '/Users/tim.knight1/DWP-Code/backstage/testing-20/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/tim.knight1/DWP-Code/backstage/testing-20/node_modules/isolated-vm/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/tim.knight1/DWP-Code/backstage/testing-20/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/tim.knight1/Library/Caches/node-gyp/22.11.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/tim.knight1/Library/Caches/node-gyp/22.11.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/tim.knight1/DWP-Code/backstage/testing-20/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/tim.knight1/Library/Caches/node-gyp/22.11.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/tim.knight1/DWP-Code/backstage/testing-20/node_modules/isolated-vm',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build', '--jobs', 12 ]
CXX(target) Release/obj.target/nortti/src/external_copy/serializer_nortti.o
CXX(target) Release/obj.target/nortti/src/isolate/allocator_nortti.o
In file included from ../src/external_copy/serializer_nortti.cc:1:
In file included from ../src/external_copy/serializer.h:2:
In file included from ../src/external_copy/external_copy.h:9:
In file included from ../src/isolate/generic/array.h:2:
../src/isolate/generic/error.h:84:65: error: value of type 'Local<Value> (Local<String>, Local<Value>)' is not implicitly convertible to 'v8::Local<v8::Value> (*)(v8::Local<v8::String>)'
using RuntimeGenericError = detail::RuntimeErrorWithConstructor<v8::Exception::Error>;
^~~~~~~~~~~~~~~~~~~~
../src/isolate/generic/error.h:85:62: error: value of type 'Local<Value> (Local<String>, Local<Value>)' is not implicitly convertible to 'v8::Local<v8::Value> (*)(v8::Local<v8::String>)'
using RuntimeTypeError = detail::RuntimeErrorWithConstructor<v8::Exception::TypeError>;
^~~~~~~~~~~~~~~~~~~~~~~~
../src/isolate/generic/error.h:86:63: error: value of type 'Local<Value> (Local<String>, Local<Value>)' is not implicitly convertible to 'v8::Local<v8::Value> (*)(v8::Local<v8::String>)'
using RuntimeRangeError = detail::RuntimeErrorWithConstructor<v8::Exception::RangeError>;
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/isolate/allocator_nortti.cc:2:
In file included from ../src/isolate/environment.h:13:
In file included from ../src/isolate/strings.h:2:
../src/isolate/generic/error.h:84:65: error: value of type 'Local<Value> (Local<String>, Local<Value>)' is not implicitly convertible to 'v8::Local<v8::Value> (*)(v8::Local<v8::String>)'
using RuntimeGenericError = detail::RuntimeErrorWithConstructor<v8::Exception::Error>;
^~~~~~~~~~~~~~~~~~~~
../src/isolate/generic/error.h:85:62: error: value of type 'Local<Value> (Local<String>, Local<Value>)' is not implicitly convertible to 'v8::Local<v8::Value> (*)(v8::Local<v8::String>)'
using RuntimeTypeError = detail::RuntimeErrorWithConstructor<v8::Exception::TypeError>;
^~~~~~~~~~~~~~~~~~~~~~~~
../src/isolate/generic/error.h:86:63: error: value of type 'Local<Value> (Local<String>, Local<Value>)' is not implicitly convertible to 'v8::Local<v8::Value> (*)(v8::Local<v8::String>)'
using RuntimeRangeError = detail::RuntimeErrorWithConstructor<v8::Exception::RangeError>;
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/external_copy/serializer_nortti.cc:1:
../src/external_copy/serializer.h:101:12: error: use of undeclared identifier 'RuntimeRangeError'; did you mean 'RuntimeError'?
throw RuntimeRangeError("Array buffer allocation failed");
^
../src/isolate/generic/error.h:13:7: note: 'RuntimeError' declared here
class RuntimeError : public std::exception {};
^
In file included from ../src/external_copy/serializer_nortti.cc:2:
../src/isolate/functor_runners.h:42:18: error: unknown type name 'RuntimeTypeError'; did you mean 'RuntimeError'?
} catch (const RuntimeTypeError& cc_error) {
^~~~~~~~~~~~~~~~
RuntimeError
../src/isolate/generic/error.h:13:7: note: 'RuntimeError' declared here
class RuntimeError : public std::exception {};
^
In file included from ../src/external_copy/serializer_nortti.cc:2:
../src/isolate/functor_runners.h:44:94: error: no member named 'GetMessage' in 'ivm::RuntimeError'
fn2(std::make_unique<ExternalCopyError>(ExternalCopyError::ErrorType::TypeError, cc_error.GetMessage().c_str(), cc_error.GetStackTrace()));
~~~~~~~~ ^
../src/isolate/functor_runners.h:44:125: error: no member named 'GetStackTrace' in 'ivm::RuntimeError'
fn2(std::make_unique<ExternalCopyError>(ExternalCopyError::ErrorType::TypeError, cc_error.GetMessage().c_str(), cc_error.GetStackTrace()));
~~~~~~~~ ^
../src/isolate/functor_runners.h:45:18: error: unknown type name 'RuntimeRangeError'; did you mean 'RuntimeError'?
} catch (const RuntimeRangeError& cc_error) {
^~~~~~~~~~~~~~~~~
RuntimeError
../src/isolate/generic/error.h:13:7: note: 'RuntimeError' declared here
class RuntimeError : public std::exception {};
^
In file included from ../src/external_copy/serializer_nortti.cc:2:
../src/isolate/functor_runners.h:46:95: error: no member named 'GetMessage' in 'ivm::RuntimeError'
fn2(std::make_unique<ExternalCopyError>(ExternalCopyError::ErrorType::RangeError, cc_error.GetMessage().c_str(), cc_error.GetStackTrace()));
~~~~~~~~ ^
../src/isolate/functor_runners.h:46:126: error: no member named 'GetStackTrace' in 'ivm::RuntimeError'
fn2(std::make_unique<ExternalCopyError>(ExternalCopyError::ErrorType::RangeError, cc_error.GetMessage().c_str(), cc_error.GetStackTrace()));
~~~~~~~~ ^
../src/isolate/functor_runners.h:47:18: error: unknown type name 'RuntimeGenericError'
} catch (const RuntimeGenericError& cc_error) {
^
../src/isolate/functor_runners.h:45:18: warning: exception of type 'const RuntimeError &' will be caught by earlier handler [-Wexceptions]
} catch (const RuntimeRangeError& cc_error) {
^
../src/isolate/functor_runners.h:42:18: note: for type 'const RuntimeError &'
} catch (const RuntimeTypeError& cc_error) {
^
../src/isolate/functor_runners.h:49:18: warning: exception of type 'const detail::RuntimeErrorWithMessage &' will be caught by earlier handler [-Wexceptions]
} catch (const detail::RuntimeErrorWithMessage& cc_error) {
^
../src/isolate/functor_runners.h:42:18: note: for type 'const RuntimeError &'
} catch (const RuntimeTypeError& cc_error) {
^
../src/isolate/functor_runners.h:51:18: warning: exception of type 'const RuntimeError &' will be caught by earlier handler [-Wexceptions]
} catch (const RuntimeError& cc_error) {
^
../src/isolate/functor_runners.h:42:18: note: for type 'const RuntimeError &'
} catch (const RuntimeTypeError& cc_error) {
^
3 errors generated.
make: *** [Release/obj.target/nortti/src/isolate/allocator_nortti.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from ../src/external_copy/serializer_nortti.cc:3:
In file included from ../src/module/transferable.h:2:
In file included from ../src/isolate/class_handle.h:6:
In file included from ../src/isolate/generic/../generic/callbacks.h:4:
../src/isolate/generic/extract_params.h:97:27: error: expected ';' after expression
throw RuntimeTypeError{CalleeName()+ " requires at least "+ std::to_string(adjusted)+ (adjusted == 1 ? " parameter" : " parameters")};
^
;
../src/isolate/generic/extract_params.h:97:11: error: use of undeclared identifier 'RuntimeTypeError'
throw RuntimeTypeError{CalleeName()+ " requires at least "+ std::to_string(adjusted)+ (adjusted == 1 ? " parameter" : " parameters")};
^
../src/isolate/generic/extract_params.h:97:137: error: expected ';' after expression
throw RuntimeTypeError{CalleeName()+ " requires at least "+ std::to_string(adjusted)+ (adjusted == 1 ? " parameter" : " parameters")};
^
;
../src/isolate/generic/extract_params.h:111:27: error: expected ';' after expression
throw RuntimeTypeError{CalleeName()+ " requires `this` to be "+ ex.type};
^
;
../src/isolate/generic/extract_params.h:111:11: error: use of undeclared identifier 'RuntimeTypeError'
throw RuntimeTypeError{CalleeName()+ " requires `this` to be "+ ex.type};
^
../src/isolate/generic/extract_params.h:111:76: error: expected ';' after expression
throw RuntimeTypeError{CalleeName()+ " requires `this` to be "+ ex.type};
^
;
../src/isolate/generic/extract_params.h:113:27: error: expected ';' after expression
throw RuntimeTypeError{CalleeName()+ " requires parameter "+ std::to_string(ii + 1)+ " to be "+ ex.type};
^
;
../src/isolate/generic/extract_params.h:113:11: error: use of undeclared identifier 'RuntimeTypeError'
throw RuntimeTypeError{CalleeName()+ " requires parameter "+ std::to_string(ii + 1)+ " to be "+ ex.type};
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
make: *** [Release/obj.target/nortti/src/external_copy/serializer_nortti.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/Users/tim.knight1/DWP-Code/backstage/testing-20/node_modules/node-gyp/lib/build.js:216:23)
gyp ERR! System Darwin 23.6.0
gyp ERR! command "/Users/tim.knight1/.nvm/versions/node/v22.11.0/bin/node" "/Users/tim.knight1/DWP-Code/backstage/testing-20/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" "-j" "max"
gyp ERR! cwd /Users/tim.knight1/DWP-Code/backstage/testing-20/node_modules/isolated-vm
gyp ERR! node -v v22.11.0
gyp ERR! node-gyp -v v10.2.0
gyp ERR! not ok
🖥️ Your Environment
Python 3.12.7
OS: Darwin 23.6.0 - darwin/arm64
node: v22.11.0
yarn: 3.8.1
cli: 0.28.2 (installed)
backstage: 1.30.0
Dependencies:
@backstage/app-defaults 1.5.12
@backstage/backend-app-api 0.9.3, 1.0.0, 1.0.1
@backstage/backend-common 0.25.0, 0.24.1
@backstage/backend-defaults 0.5.2, 0.4.4, 0.5.0
@backstage/backend-dev-utils 0.1.5
@backstage/backend-openapi-utils 0.2.0
@backstage/backend-plugin-api 1.0.1, 0.8.1, 1.0.0
@backstage/backend-tasks 0.6.1
@backstage/backend-test-utils 1.0.2
@backstage/catalog-client 1.6.6, 1.7.0, 1.7.1
@backstage/catalog-model 1.7.0, 1.6.0
@backstage/cli-common 0.1.14
@backstage/cli-node 0.2.7, 0.2.8, 0.2.9
@backstage/cli 0.28.2
@backstage/config-loader 1.9.0, 1.9.1
@backstage/config 1.2.0
@backstage/core-app-api 1.15.1, 1.15.0
@backstage/core-compat-api 0.3.0, 0.3.1
@backstage/core-components 0.15.1, 0.15.0
@backstage/core-plugin-api 1.10.0, 1.9.3, 1.9.4
@backstage/e2e-test-utils 0.1.1
@backstage/errors 1.2.4
@backstage/eslint-plugin 0.1.10
@backstage/frontend-app-api 0.10.0
@backstage/frontend-defaults 0.1.1
@backstage/frontend-plugin-api 0.8.0, 0.9.0
@backstage/frontend-test-utils 0.2.1
@backstage/integration-aws-node 0.1.12
@backstage/integration-react 1.2.0, 1.1.32
@backstage/integration 1.14.0, 1.15.0, 1.15.1
@backstage/plugin-api-docs 0.11.11
@backstage/plugin-app-backend 0.3.76
@backstage/plugin-app-node 0.1.26
@backstage/plugin-app 0.1.1
@backstage/plugin-auth-backend-module-atlassian-provider 0.3.1
@backstage/plugin-auth-backend-module-auth0-provider 0.1.1
@backstage/plugin-auth-backend-module-aws-alb-provider 0.2.1
@backstage/plugin-auth-backend-module-azure-easyauth-provider 0.2.1
@backstage/plugin-auth-backend-module-bitbucket-provider 0.2.1
@backstage/plugin-auth-backend-module-bitbucket-server-provider 0.1.1
@backstage/plugin-auth-backend-module-cloudflare-access-provider 0.3.1
@backstage/plugin-auth-backend-module-gcp-iap-provider 0.3.1
@backstage/plugin-auth-backend-module-github-provider 0.2.1
@backstage/plugin-auth-backend-module-gitlab-provider 0.2.1
@backstage/plugin-auth-backend-module-google-provider 0.2.1
@backstage/plugin-auth-backend-module-guest-provider 0.2.1
@backstage/plugin-auth-backend-module-microsoft-provider 0.2.1
@backstage/plugin-auth-backend-module-oauth2-provider 0.3.1
@backstage/plugin-auth-backend-module-oauth2-proxy-provider 0.2.1
@backstage/plugin-auth-backend-module-oidc-provider 0.3.1
@backstage/plugin-auth-backend-module-okta-provider 0.1.1
@backstage/plugin-auth-backend-module-onelogin-provider 0.2.1
@backstage/plugin-auth-backend 0.23.1
@backstage/plugin-auth-node 0.5.3, 0.5.2, 0.5.1
@backstage/plugin-auth-react 0.1.7
@backstage/plugin-bitbucket-cloud-common 0.2.22, 0.2.24
@backstage/plugin-catalog-backend-module-gitlab-org 0.2.2
@backstage/plugin-catalog-backend-module-gitlab 0.4.4
@backstage/plugin-catalog-backend-module-logs 0.1.3
@backstage/plugin-catalog-backend-module-scaffolder-entity-model 0.2.1, 0.1.22
@backstage/plugin-catalog-backend 1.27.1
@backstage/plugin-catalog-common 1.1.0, 1.0.26
@backstage/plugin-catalog-graph 0.4.11
@backstage/plugin-catalog-import 0.12.5
@backstage/plugin-catalog-node 1.12.6, 1.13.1
@backstage/plugin-catalog-react 1.14.0, 1.13.1
@backstage/plugin-catalog 1.24.0
@backstage/plugin-events-node 0.3.10, 0.4.0, 0.4.3
@backstage/plugin-home-react 0.1.18
@backstage/plugin-home 0.8.0
@backstage/plugin-kubernetes-backend 0.18.7
@backstage/plugin-kubernetes-common 0.8.3
@backstage/plugin-kubernetes-node 0.1.20
@backstage/plugin-kubernetes-react 0.4.4
@backstage/plugin-kubernetes 0.11.16
@backstage/plugin-org 0.6.31
@backstage/plugin-permission-backend-module-allow-all-policy 0.2.1
@backstage/plugin-permission-backend 0.5.50
@backstage/plugin-permission-common 0.8.1
@backstage/plugin-permission-node 0.8.4, 0.8.3, 0.8.2
@backstage/plugin-permission-react 0.4.27, 0.4.26
@backstage/plugin-proxy-backend 0.5.7
@backstage/plugin-scaffolder-backend-module-azure 0.1.16, 0.2.1
@backstage/plugin-scaffolder-backend-module-bitbucket-cloud 0.1.14, 0.2.1
@backstage/plugin-scaffolder-backend-module-bitbucket-server 0.1.14, 0.2.1
@backstage/plugin-scaffolder-backend-module-bitbucket 0.2.14, 0.3.1
@backstage/plugin-scaffolder-backend-module-gerrit 0.1.16, 0.2.1
@backstage/plugin-scaffolder-backend-module-gitea 0.1.14, 0.2.1
@backstage/plugin-scaffolder-backend-module-github 0.4.2, 0.5.1
@backstage/plugin-scaffolder-backend-module-gitlab 0.6.0, 0.4.6
@backstage/plugin-scaffolder-backend 1.26.2, 1.24.1
@backstage/plugin-scaffolder-common 1.5.5, 1.5.6
@backstage/plugin-scaffolder-node 0.4.10, 0.4.11, 0.5.0
@backstage/plugin-scaffolder-react 1.13.2
@backstage/plugin-scaffolder 1.26.2
@backstage/plugin-search-backend-module-catalog 0.2.4
@backstage/plugin-search-backend-module-pg 0.5.37
@backstage/plugin-search-backend-module-techdocs 0.3.1
@backstage/plugin-search-backend-node 1.3.4, 1.3.2
@backstage/plugin-search-backend 1.6.1
@backstage/plugin-search-common 1.2.14
@backstage/plugin-search-react 1.8.1, 1.8.0
@backstage/plugin-search 1.4.18
@backstage/plugin-signals-react 0.0.5, 0.0.6
@backstage/plugin-techdocs-backend 1.11.1
@backstage/plugin-techdocs-common 0.1.0
@backstage/plugin-techdocs-module-addons-contrib 1.1.16
@backstage/plugin-techdocs-node 1.12.12
@backstage/plugin-techdocs-react 1.2.9
@backstage/plugin-techdocs 1.11.0
@backstage/plugin-user-settings-common 0.0.1
@backstage/plugin-user-settings 0.8.14
@backstage/release-manifests 0.0.11
@backstage/test-utils 1.7.0
@backstage/theme 0.6.0, 0.5.7
@backstage/types 1.1.1
@backstage/version-bridge 1.0.10, 1.0.8, 1.0.9
👀 Have you spent some time to check if this bug has been raised before?
- [X] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [X] I have read the Code of Conduct
Are you willing to submit PR?
None
I reached this issue, too. I reverted to Node v20 for now... Relevant https://github.com/backstage/backstage/issues/27403
I think this will be fixed next week once Backstage 1.33 will be released. In the meantime I recommend you to use node 20.
@vinzscam perfect thank you
Getting the same error with Backstage 1.32 with node 22 and 23. But it's working with node 20.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.