chore: upgrade Node.js from 20.19.4 to 22.19.0 and update dependencies#19870
Conversation
f2ec4af to
241294b
Compare
|
if everything still seems to work on 22 I'd be happy for us to upgrade. we need to upgrade everyone tho. for reference, here's the most recently merged node upgrade: |
3622f3e to
3e3a767
Compare
|
Thanks, I've overlooked those. Also, in Node 22, Node’s Intl timezone support is slightly different from tzdata (e.g., “America/Coyhaique” exists in tzdata but is rejected by Intl/dayjs). Hence, the tests started failing on the 22 version. |
it's not that, the version you picked just has an older version of the database v22.14.0/tz-version.txt -> 2024b |
|
I'm kind of a nix noob but this shows 22.18, which uses 2025b. https://search.nixos.org/packages?channel=25.05&show=nodejs_22&query=nodejs_22 |
3e3a767 to
4e7f6cb
Compare
In the nix flake's devshell, we used `nodejs_20` (20.18.3). `vite@7.1.4` requires a newer node version (^20.19.0). This commit bumps the flake's node version to `nodejs_22`, and updates the allowed engine versions in the sites package.json. ```bash ❯ make gen generate ok github.com/coder/coder/v2/coderd/database/gentest 0.649s ok github.com/coder/coder/v2/cli 3.258s ok github.com/coder/coder/v2/coderd 3.655s ok github.com/coder/coder/v2/coderd/notifications 3.322s ok github.com/coder/coder/v2/enterprise/cli 2.238s ok github.com/coder/coder/v2/enterprise/tailnet 0.741s ok github.com/coder/coder/v2/helm/coder/tests 2.891s ok github.com/coder/coder/v2/helm/provisioner/tests 1.336s ok github.com/coder/coder/v2/provisioner/terraform 0.755s ok github.com/coder/coder/v2/tailnet 0.697s + pnpm install Lockfile is up to date, resolution step is skipped ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version) Your Node version is incompatible with "vite@7.1.4(@types/node@20.17.16)(jiti@2.4.2)(yaml@2.7.0)". Expected version: ^20.19.0 || >=22.12.0 Got: v20.18.3 This is happening because the package's manifest has an engines.node field specified. To fix this issue, install the required Node version. make: *** [Makefile:416: site/node_modules/.installed] Error 1 ```
4e7f6cb to
96684bf
Compare
Kinda. We're still on the 24.11 release channel. I've now pulled in the nodejs_22 from the unstable nixpkgs, which is v22.19.0. Thanks Kayla. |
aslilac
left a comment
There was a problem hiding this comment.
code looks perfect! thanks!
might update the pr title before you merge tho, this is a bit more than just bumping the engine field now :)

Update Node.js from 20.19.4 to 22.19.0
This PR updates Node.js from v20.19.4 to v22.19.0 across the codebase. The change includes:
pkgs.nodejs_20tounstablePkgs.nodejs_22in the Nix flakeThe PR also improves the error message for Playwright version mismatches by showing the actual versions in the error.