Skip to content

chore: migrate project from Node 16 to Node v22.22.1#1215

Open
sudorishabh wants to merge 1 commit intoRocketChat:developfrom
sudorishabh:chore/node-24-migration
Open

chore: migrate project from Node 16 to Node v22.22.1#1215
sudorishabh wants to merge 1 commit intoRocketChat:developfrom
sudorishabh:chore/node-24-migration

Conversation

@sudorishabh
Copy link

This Pull Request migrates the core development and CI/CD environments from Node.js v16.19.0 (which is now End-of-Life) to Node.js v22.22.1. This upgrade enables the use of modern Node APIs (such as native global fetch), improves security by adhering to an actively maintained LTS release, and ensures compatibility with modern tooling.

How Has This Been Tested?

  • Ran yarn install to ensure node-check.js allows installation under Node v22.22.1.
  • Ran yarn build across all sub-packages (api, auth, react, ui-elements) successfully using Node 22.
  • Started local Storybook development server cleanly.

Fixes #1214

Technical Changes

  • .nvmrc: Bumped node version to v22.22.1.
  • scripts/node-check.js: Reverted to strict checking (process.version !== expectedVersion) against the new v22.22.1 string to ensure environment parity across the team.
  • GitHub Actions: Updated setup-node versions to 22.22.1 in:
    • .github/workflows/build-and-lint.yml
    • .github/workflows/build-pr.yml
    • .github/workflows/deploy.yml
    • .github/workflows/playwright.yml
  • Documentation: Updated README.md Prerequisites to reflect Node 22 requirement.
  • Dependencies: Bumped @types/node to ^22.0.0 in packages/e2e-react to ensure type-checking corresponds correctly to the new Node runtime APIs.
Image Image Image

Node v16 vs v22

Image

Why v22?

I picked Node 22 because it’s more stable and reliable right now, so there’s less chance of things breaking compared to Node 24.

Video/Screenshots

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-1214 after approval. Contributors are requested to replace <pr_number> with the actual PR number.

- Update .nvmrc and README.md to specify Node v22.22.1
- Modify GitHub Action workflows to use Node v22.22.1
- Update @types/node in sub-packages for Node 22 support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chore: Migrate project environment from Node v16 to Node v22

1 participant