Skip to content

Conversation

@petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Jan 29, 2026

This PR fixes the quick-edit deployment failure on Node.js 24 caused by native module compilation errors.

Problem

Node.js 24 requires C++20 for V8 headers. When building quick-edit, the tree-sitter native module in VSCode's vendor/vscode/build/ directory fails to compile with errors like:

error: "C++20 or later required."
error: unknown type name 'concept'
error: use of undeclared identifier 'requires'

Solution

This change adds a workflow step using actions/setup-node@v4 to switch to Node 22 before running the quick-edit preview/deploy. This approach:

  • Works reliably (unlike nvm which isn't available on macOS runners)
  • Keeps the fix in the workflow where the Node version switching belongs
  • Doesn't require changes to the quick-edit setup.sh script

Changes

  • .github/workflows/deploy-pages-previews.yml:
    • Added Node 24 for testing
    • Added a step to switch to Node 22 before quick-edit preview

Testing

To test this fix:

  1. Add the preview:quick-edit label to this PR
  2. The deploy-pages-previews workflow will trigger with Node 24
  3. Before the quick-edit step, it will switch to Node 22 via setup-node
  4. Monitor the workflow to verify the tree-sitter compilation succeeds

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: This fix will be validated by the preview workflow when the preview:quick-edit label is added
  • Public documentation
    • Documentation not necessary because: Internal CI/build fix only

Node.js 24 requires C++20 for V8 headers, which causes native modules
like tree-sitter to fail compilation during the VSCode build process.

This change:
- Adds a patch to set CXXFLAGS='-std=c++20' in VSCode's postinstall.js
- Updates deploy-pages-previews workflow to use Node 24 for testing
@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

⚠️ No Changeset found

Latest commit: 5abb09c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 29, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12287

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12287

miniflare

npm i https://pkg.pr.new/miniflare@12287

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12287

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12287

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12287

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12287

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12287

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12287

wrangler

npm i https://pkg.pr.new/wrangler@12287

commit: 5abb09c

@petebacondarwin petebacondarwin added the preview:quick-edit Trigger a quick edit preview deploy label Jan 29, 2026
Node.js 24 requires C++20 for V8 headers, which causes native modules
like tree-sitter to fail compilation during the VSCode build process.

Instead of patching VSCode's build system, this change uses nvm to
switch to Node 22 specifically for the quick-edit deployment while
keeping the rest of the deployment process on Node 24.
Node.js 24 requires C++20 for V8 headers, which causes native modules
like tree-sitter to fail compilation during the VSCode build process.

This change adds nvm-based Node 22 switching in setup.sh before running
npm install, which is where the native module compilation happens.

Also updates deploy-pages-previews.yml to use Node 24 for testing.
Node.js 24 requires C++20 for V8 headers, which causes native modules
like tree-sitter to fail compilation during the VSCode build process.

Instead of trying to use nvm (which isn't available on macOS runners),
this adds a workflow step using actions/setup-node@v4 to switch to
Node 22 before running the quick-edit preview.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:quick-edit Trigger a quick edit preview deploy

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

1 participant