builder icon indicating copy to clipboard operation
builder copied to clipboard

Bug: @builder.io/react fails to install on Node.js 24+ due to C++20 compilation requirements

Open lexabu opened this issue 4 months ago • 2 comments

Environment:

  • Node.js version: v24.6.0
  • Platform: macOS (darwin arm64)
  • Package: @builder.io/react@^8.2.7
  • Compiler: Xcode Command Line Tools

Issue: Installation of @builder.io/react fails on Node.js 24+ because the isolated-vm dependency requires C++20 compilation support, but the current compilation configuration doesn't enable it.

Urgency: Node.js 24 will become the LTS version in October 2025, making this a critical compatibility issue that will affect all new projects and LTS migrations.

Root Cause: Node.js 24+ ships with V8 headers that require C++20 features (concept, requires, etc.), but isolated-vm's build configuration doesn't specify C++20 standard, causing compilation failures.

Key Error Messages: error: "C++20 or later required." error: unknown type name 'concept' error: unknown type name 'requires' error: a non-type template parameter cannot have type 'ExternalPointerTagRange' (aka 'TagRange<ExternalPointerTag>') before C++20

Attempted Workarounds:

  • ✅ Works: Node.js 22.x
  • ❌ Fails: Node.js 24+ (even with --no-node-snapshot flag)
  • ❌ Fails: node --no-node-snapshot $(which npm) install @builder.io/react

Expected Behavior: npm install @builder.io/react should work on all supported Node.js versions, including 24+.

Suggested Solutions:

  1. Update isolated-vm dependency: Use a version that supports Node.js 24+ with proper C++20 compilation flags
  2. Replace isolated-vm: Consider alternatives that are compatible with modern Node.js versions
  3. Build configuration: Ensure C++20 standard is enabled when building native extensions
  4. Provide prebuilt binaries: Distribute prebuilt binaries for Node.js 24+ to avoid compilation issues

Impact: This blocks the adoption of Builder.io in projects using modern Node.js versions (24+). With Node.js 24 becoming LTS soon, this will affect all new projects and teams migrating to the latest LTS version.

lexabu avatar Aug 30 '25 19:08 lexabu

I ran into the same issue when updating to Node.js 24.

I’m using Yarn 1.x, and as a test I forced isolated-vm to version 6 by adding the following to package.json:

...
  "resolutions": {
    "isolated-vm": "^6.0.0",
  }
...

With version 6 it installed and ran without errors in my app, so the upgrade path might not be too complicated.

adiulici avatar Sep 03 '25 08:09 adiulici

I made a PR for this: https://github.com/BuilderIO/builder/pull/4145

Battjmo avatar Sep 17 '25 14:09 Battjmo