Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rush] Add support for the latest LTS version of Node (v22) to Rush repo #5033

Closed
npetruzzelli opened this issue Dec 6, 2024 · 4 comments · Fixed by #5038
Closed

[rush] Add support for the latest LTS version of Node (v22) to Rush repo #5033

npetruzzelli opened this issue Dec 6, 2024 · 4 comments · Fixed by #5038

Comments

@npetruzzelli
Copy link

Summary

We recommend the latest LTS version, because non-stable NodeJS releases frequently have bugs."

source: https://rushjs.io/pages/developer/new_developer/#prerequisites

The latest, current LTS version of Node is v22, but trying to use it with Rush results in the following error:

ERROR: Your dev environment is running Node.js version v22.2.0 which does not meet the requirements for building this
repository.  (The rush.json configuration requires nodeSupportedVersionRange=">=18.15.0 <19.0.0 || >=20.9.0 <21.0.0")

Image
https://nodejs.org/en/about/previous-releases

Repro steps

  1. fork/clone https://github.com/microsoft/rushstack
  2. install rush: npm install -g @microsoft/rush
  3. execute rush update

Expected result:
rush update executes without issue.

Actual result:
rush update failed with an error that claims Node 22 is not supported, which is contrary to the recommendation on the website.

Details

Either it has not been tested with Node 22 or the version check script itself is out of date.

A first pass would be updating the script locally, allowing it to run with node 22 and see if test suites pass/fail and determine next steps based on the results of that.

It may be that updating nodeSupportedVersionRange in rush.json is enough.

I may be making some poor assumptions as I am new to Rush.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? @microsoft/rush@5.144.0
rushVersion from rush.json? 5.143.0-pr5009.1
useWorkspaces from rush.json? N/A
Operating system? Windows 10
Would you consider contributing a PR? Yes / if time allows
Node.js version (node -v)? v22.2.0
@iclanton
Copy link
Member

iclanton commented Dec 9, 2024

This depends on #5031, as a built-in dependency of node-fetch@2 is dropped in Node 22. Once that's in, I'll bump Rush to support Node 22.

@iclanton iclanton moved this from Needs triage to In Progress in Bug Triage Dec 9, 2024
@iclanton
Copy link
Member

Related: #5008

@npetruzzelli
Copy link
Author

@iclanton - Thank you for the swift response to this and #5034

It is much appreciated!

This will make my life, that of my co-workers, and probably other people out there, that much better.

@iclanton
Copy link
Member

Glad to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants