From 43508580e07bd4d8c676c94530d51cfe83c53138 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Tue, 4 Nov 2025 21:42:50 -1000 Subject: [PATCH] Fix Node.js 22 V8 cache crash by reverting to Node 20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous attempt to disable yarn caching for Node 22 using cache: '' caused CI failures because GitHub Actions setup-node doesn't accept empty strings for the cache parameter and still attempts to initialize caching, resulting in "Could not get yarn cache folder path" errors. This commit reverts all workflows to use Node 20 until the V8 bug is resolved. This is a temporary workaround that ensures CI stability. Changes: - Revert lint-js-and-ruby.yml from Node 22 to Node 20 with normal caching - Revert main.yml matrix to use Node 20 for both latest and minimum dependency levels - Simplify package-js-tests.yml to only test Node 20 - Remove conditional cache logic that was causing failures - Remove conditional frozen-lockfile flag that depended on Node 22 Related: https://github.com/nodejs/node/issues/56010 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/lint-js-and-ruby.yml | 7 ++----- .github/workflows/main.yml | 10 +++------- .github/workflows/package-js-tests.yml | 14 +++----------- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/lint-js-and-ruby.yml b/.github/workflows/lint-js-and-ruby.yml index 097a45f13e..cd119c1534 100644 --- a/.github/workflows/lint-js-and-ruby.yml +++ b/.github/workflows/lint-js-and-ruby.yml @@ -54,11 +54,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 22 - # TODO: Re-enable cache when Node.js 22 V8 bug is fixed - # Disable cache for Node 22 due to V8 bug in 22.21.0 - # Track: https://github.com/nodejs/node/issues/56010 - cache: '' + node-version: 20 + cache: 'yarn' cache-dependency-path: '**/yarn.lock' - name: Print system information run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 874439614b..ff65fae581 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: include: # Always run: Latest versions (fast feedback on PRs) - ruby-version: '3.4' - node-version: '22' + node-version: '20' dependency-level: 'latest' # Master only: Minimum supported versions (full coverage) - ruby-version: '3.2' @@ -69,9 +69,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - # Disable cache for Node 22 due to V8 bug in 22.21.0 - # https://github.com/nodejs/node/issues/56010 - cache: ${{ matrix.node-version != '22' && 'yarn' || '' }} + cache: 'yarn' cache-dependency-path: '**/yarn.lock' - name: Print system information run: | @@ -150,9 +148,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - # Disable cache for Node 22 due to V8 bug in 22.21.0 - # https://github.com/nodejs/node/issues/56010 - cache: ${{ matrix.node-version != '22' && 'yarn' || '' }} + cache: 'yarn' cache-dependency-path: '**/yarn.lock' - name: Print system information run: | diff --git a/.github/workflows/package-js-tests.yml b/.github/workflows/package-js-tests.yml index 73e1628123..e630e8afee 100644 --- a/.github/workflows/package-js-tests.yml +++ b/.github/workflows/package-js-tests.yml @@ -47,11 +47,7 @@ jobs: (github.ref == 'refs/heads/master' || needs.detect-changes.outputs.run_js_tests == 'true') strategy: matrix: - include: - # Always run: Latest Node version (fast feedback on PRs) - - node-version: '22' - # Master only: Minimum supported Node version (full coverage) - - node-version: '20' + node-version: ['20'] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -61,10 +57,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - # TODO: Re-enable cache when Node.js 22 V8 bug is fixed - # Disable cache for Node 22 due to V8 bug in 22.21.0 - # Track: https://github.com/nodejs/node/issues/56010 - cache: ${{ matrix.node-version != '22' && 'yarn' || '' }} + cache: 'yarn' cache-dependency-path: '**/yarn.lock' - name: Print system information run: | @@ -74,11 +67,10 @@ jobs: echo "Node version: "; node -v echo "Yarn version: "; yarn --version - name: run conversion script - if: matrix.node-version == '20' run: script/convert - name: Install Node modules with Yarn for renderer package run: | - yarn install --no-progress --no-emoji ${{ matrix.node-version == '22' && '--frozen-lockfile' || '' }} + yarn install --no-progress --no-emoji sudo yarn global add yalc - name: Build Renderer package run: yarn build