Skip to content

Node.js: Drop support for EOL majors (v21,v23), and old minors#55114

Closed
robhogan wants to merge 2 commits intomainfrom
export-D90467358
Closed

Node.js: Drop support for EOL majors (v21,v23), and old minors#55114
robhogan wants to merge 2 commits intomainfrom
export-D90467358

Conversation

@robhogan
Copy link
Copy Markdown
Contributor

@robhogan robhogan commented Jan 11, 2026

Summary:
Our official docs require:

Node 20.19.4 or newer

Currently, our package.json#engines fields express this as "node": ">= 20.19.4"

This is a bit imprecise because of Node's overlapping release lines - e.g. v24.0.0 is actually older than v20.19.4 (2025-07-15), and the whole v21 line was already EOL before v20.19.4.

The release date is relevant because Node.js frequently backports the most important updates - notably, require(esm) is already stable in Node 20.19 but is not unflagged in v22 until v22.12.

This makes the package.json#engines requirement truer to the documented requirement, dropping some old minors and EOL majors that prevent us using features included in v20.19.

Notably, require(esm) is stable and unflagged on all versions supported from this diff.

  • v21 and v23 are EOL, so are dropped.
  • v22.13 pre-dates 20.19.4 and is the first to have unflagged silent require(esm)
  • v24.3.0 pre-dates 20.19.4 and is the first to unflag TS-stripping
  • Support v25 and newer.

Changelog:
[General][Breaking] Drop support for EOL Node.js lines and old minors.

Differential Revision: D90467358

Summary:
Reverts #55038

Dropping v20 (still in LTS) causes friction with Expo's release policy.

Changelog:
[General][Feature] Revert #55038

Differential Revision: D90467161
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 11, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jan 11, 2026

@robhogan has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90467358.

@github-actions
Copy link
Copy Markdown

Job Summary for Gradle

Test All :: run_fantom_tests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
react-native-github :private:react-native-fantom:buildFantomTester 9.0.0 Build Scan not published

…nd EOL v21,v23 (#55114)

Summary:
Pull Request resolved: #55114

Our official [docs](https://reactnative.dev/docs/set-up-your-environment#node--watchman) require:

> Node 20.19.4 or newer

Currently, our `package.json#engines` fields express this as `"node": ">= 20.19.4"`

This is a bit imprecise because of Node's overlapping release lines - e.g. v24.0.0 is actually older than v20.19.4 (2025-07-15), and the whole v21 line was already EOL before v20.19.4.

The release *date* is relevant because Node.js frequently backports the most important updates - notably, `require(esm)` is already stable in Node 20.19 but is not unflagged in v22 until v22.12.

This makes the `package.json#engines` requirement truer to the documented requirement, dropping some old minors and EOL majors that prevent us using features included in v20.19.

Notably, `require(esm)` is stable and unflagged on all versions supported from this diff.

 - v21 and v23 are EOL, so are dropped.
 - v22.13 pre-dates 20.19.4 and is the first to have unflagged silent `require(esm)`
 - v24.3.0 pre-dates 20.19.4 and is the first to unflag TS-stripping
 - Support v25 and newer.

Changelog:
[General][Breaking] Drop support for EOL Node.js lines and old minors.

Differential Revision: D90467358
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @robhogan in 3d6a749

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jan 11, 2026
@github-actions
Copy link
Copy Markdown

Job Summary for Gradle

Test All :: run_fantom_tests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
react-native-github :private:react-native-fantom:buildFantomTester 9.0.0 Build Scan not published

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@chrfalch
Copy link
Copy Markdown
Collaborator

Thanks for this PR, @robhogan - I was asked to give some feedback from Expo, and we're pretty happy with this, the only thing we'd like to ask for is if you have any thoughts on the policy for both future deprecations and new releases of Node - How should they be handled? Any thoughts on this? Thanks <3

@meta-codesync meta-codesync Bot closed this in c9c601d Jan 14, 2026
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @robhogan in c9c601d

When will my fix make it into a release? | How to file a pick request?

meta-codesync Bot pushed a commit to facebook/metro that referenced this pull request Feb 20, 2026
Summary:
Drop support for EOL majors (v21, v23) and old minors (< v22.13, < v24.3). Retain support for Node v20.19.

Supported versions are now:
`^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0`

This aligns with what we were already testing in CI, and should be a very low-friction break as we're only requiring more recent minors in most cases.

Notably this exactly aligns with RN's current requirements, as of:
See reasoning in facebook/react-native#55114

Changelog:
```
 - **[Breaking]:** Drop support for Node v21, v23, and LTS minors released before v20.19.
```

Reviewed By: vzaidman

Differential Revision: D93857399

fbshipit-source-id: a73a51328da8c5413491a70edcf60258146f2c89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants