fix(ci): upgrade Node to 22 and actions to v4#113
Merged
Conversation
The CI was failing with "Cannot find module @rollup/rollup-linux-x64-gnu" due to a known npm bug with optional dependencies on older Node versions. Changes: - Upgrade actions/checkout from v2/v3 to v4 in all workflows - Upgrade actions/setup-node from v2/v3 to v4 in all workflows - Upgrade Node.js from 20 to 22 in all workflows The rollup native module resolution issue is resolved by using Node 22 which handles optional peer dependencies correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CI was failing with:
This is a known npm bug where optional native dependencies (like Rollup's platform-specific binaries) are not correctly resolved when using older Node.js versions with a stale lockfile on Linux runners.
Changes
v2.4.0/v3→v4(all workflows)v2.4.1/v3→v4(all workflows)20→22(all workflows)Why this fixes the issue
Node 22 ships with npm 10.x which correctly handles optional peer dependencies and platform-specific packages like
@rollup/rollup-linux-x64-gnu. The updated GitHub Actions versions also provide better caching and compatibility with modern runners.Affected workflows
.github/workflows/ci.yml.github/workflows/deploy.yml.github/workflows/lint.ymlNote
The
package-lock.jsonwas not regenerated in this PR. If the issue persists after this change, regenerating the lockfile with Node 22 locally would be the next step.