close
Skip to content

[Enhancement]: maybe bump .nvmrc to Node v.23.x.x #3350

@n8finch

Description

@n8finch

Describe the solution you'd like

When building a local version of Playground that we're hosting, I'd run npm run rebuild:wordpress-builds, and I kept running into an error:

node packages/playground/wordpress-builds/build/build.js --wp-version=nightly --output-js=packages/playground/wordpress-builds/src/wordpress --output-assets=packages/playground/wordpress-builds/public --force=true

node:internal/deps/undici/undici:14902
      Error.captureStackTrace(err);
            ^

TypeError: fetch failed
    at node:internal/deps/undici/undici:14902:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async file:///Users/admin/Desktop/hello/uw-mark/wordpress-playground/packages/playground/wordpress-builds/build/build.js:47:18 {
  [cause]: ConnectTimeoutError: Connect Timeout Error (attempted addresses: 198.143.164.251:443, timeout: 10000ms)
      at onConnectTimeout (node:internal/deps/undici/undici:2718:28)
      at Immediate._onImmediate (node:internal/deps/undici/undici:2699:11)
      at process.processImmediate (node:internal/timers:485:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT',
    [Symbol(undici.error.UND_ERR)]: true,
    [Symbol(undici.error.UND_ERR_CONNECT_TIMEOUT)]: true
  }
}

Node.js v22.22.0

If you run the same command with the --verbose flag, you can see the issue more clearly:

> nx run playground-cli:unbuilt-jspi run-blueprint --wp=https://downloads.w.org/release/wordpress-6.6.4.zip --mount-before-install=/Users/admin/Desktop/hello/uw-mark/wordpress-playground/packages/playground/wordpress-builds/build/wordpress:/wordpress

> node -e "if (parseInt(process.versions.node) < 23) { console.error('Node.js version 23 or greater is required for JSPI support'); process.exit(1); }"

Node.js version 23 or greater is required for JSPI support
Warning: command "node -e "if (parseInt(process.versions.node) < 23) { console.error('Node.js version 23 or greater is required for JSPI support'); process.exit(1); }"" exited with non-zero status code

Asking Claude about this, it returned:

The npm run rebuild:wordpress-builds command runs the bundle-wordpress:major-and-beta target, which internally calls nx run
  playground-cli:unbuilt-jspi. That target has a check:

  node -e "if (parseInt(process.versions.node) < 23) { ... process.exit(1); }"

  JSPI (JavaScript Promise Integration) requires Node.js 23+ because it's an experimental WebAssembly feature only available in V8
  versions shipped with Node 23+. The Playground CLI uses JSPI to run PHP-WASM with proper async support, and the WordPress build process
  uses the CLI to set up and bundle WordPress.

After bumping my Node version to 23.x.x, the build worked as expected.

Has the build been working for others using v.22 or below?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions