From c9c601d61af836d26ab628c2c8a30bae713ef010 Mon Sep 17 00:00:00 2001 From: Rob Hogan Date: Wed, 14 Jan 2026 10:49:05 -0800 Subject: [PATCH] Node.js: Drop support for Node.js versions released before 20.19.4, and EOL v21,v23 (#55114) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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. Reviewed By: cortinico, huntie Differential Revision: D90467358 fbshipit-source-id: a5fdfb1b93a9d6cffe78eb6811ff7420ab906f44 --- packages/assets/package.json | 2 +- packages/babel-plugin-codegen/package.json | 2 +- packages/community-cli-plugin/package.json | 2 +- packages/core-cli-utils/package.json | 2 +- packages/debugger-frontend/package.json | 2 +- packages/debugger-shell/package.json | 2 +- packages/dev-middleware/package.json | 2 +- packages/eslint-config-react-native/package.json | 2 +- packages/eslint-plugin-react-native/package.json | 2 +- packages/eslint-plugin-specs/package.json | 2 +- packages/gradle-plugin/package.json | 2 +- packages/metro-config/package.json | 2 +- packages/new-app-screen/package.json | 2 +- packages/polyfills/package.json | 2 +- packages/react-native-babel-preset/package.json | 2 +- packages/react-native-babel-transformer/package.json | 2 +- packages/react-native-codegen/package.json | 2 +- packages/react-native-compatibility-check/package.json | 2 +- packages/react-native/package.json | 2 +- packages/rn-tester/package.json | 2 +- packages/virtualized-lists/package.json | 2 +- private/helloworld/package.json | 2 +- private/react-native-bots/package.json | 2 +- private/react-native-codegen-typescript-test/package.json | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/assets/package.json b/packages/assets/package.json index 87fa027eefe..9b90fdcac85 100644 --- a/packages/assets/package.json +++ b/packages/assets/package.json @@ -17,7 +17,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "files": [ "path-support.js", diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 810a849529d..8d26526c187 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -19,7 +19,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "files": [ "index.js" diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 3cce16ac077..0d48383190d 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -55,6 +55,6 @@ } }, "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" } } diff --git a/packages/core-cli-utils/package.json b/packages/core-cli-utils/package.json index 7403c81ad5b..8d8351eee31 100644 --- a/packages/core-cli-utils/package.json +++ b/packages/core-cli-utils/package.json @@ -37,6 +37,6 @@ "dependencies": {}, "devDependencies": {}, "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" } } diff --git a/packages/debugger-frontend/package.json b/packages/debugger-frontend/package.json index 6b5108b1e93..fa88b9e9a58 100644 --- a/packages/debugger-frontend/package.json +++ b/packages/debugger-frontend/package.json @@ -20,6 +20,6 @@ "BUILD_INFO" ], "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" } } diff --git a/packages/debugger-shell/package.json b/packages/debugger-shell/package.json index bb0513f4a2a..248abe6b7d8 100644 --- a/packages/debugger-shell/package.json +++ b/packages/debugger-shell/package.json @@ -38,7 +38,7 @@ }, "license": "MIT", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "dependencies": { "cross-spawn": "^7.0.6", diff --git a/packages/dev-middleware/package.json b/packages/dev-middleware/package.json index a02927f44e9..ecd8bf51bfb 100644 --- a/packages/dev-middleware/package.json +++ b/packages/dev-middleware/package.json @@ -51,6 +51,6 @@ "wait-for-expect": "^3.0.2" }, "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" } } diff --git a/packages/eslint-config-react-native/package.json b/packages/eslint-config-react-native/package.json index e43deeabd1c..7b19fb007fe 100644 --- a/packages/eslint-config-react-native/package.json +++ b/packages/eslint-config-react-native/package.json @@ -16,7 +16,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "main": "index.js", "exports": { diff --git a/packages/eslint-plugin-react-native/package.json b/packages/eslint-plugin-react-native/package.json index a19a0db63e1..47af2f5f4a0 100644 --- a/packages/eslint-plugin-react-native/package.json +++ b/packages/eslint-plugin-react-native/package.json @@ -22,6 +22,6 @@ "hermes-eslint": "0.33.3" }, "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" } } diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index d10d8dc8801..dc1ec77d39e 100644 --- a/packages/eslint-plugin-specs/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -36,6 +36,6 @@ "hermes-eslint": "0.33.3" }, "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" } } diff --git a/packages/gradle-plugin/package.json b/packages/gradle-plugin/package.json index ceebf6c894e..73cce7e24e8 100644 --- a/packages/gradle-plugin/package.json +++ b/packages/gradle-plugin/package.json @@ -16,7 +16,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "scripts": { "build": "./gradlew build", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index c37ca680364..b284b2037aa 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -16,7 +16,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "exports": { ".": "./src/index.js", diff --git a/packages/new-app-screen/package.json b/packages/new-app-screen/package.json index 843ae90a9e1..1d303106c4f 100644 --- a/packages/new-app-screen/package.json +++ b/packages/new-app-screen/package.json @@ -30,6 +30,6 @@ } }, "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" } } diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 8bc4ac8a4e3..754374e4e7a 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -18,7 +18,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "files": [ "console.js", diff --git a/packages/react-native-babel-preset/package.json b/packages/react-native-babel-preset/package.json index 4aa4a6ba749..b76c32bc116 100644 --- a/packages/react-native-babel-preset/package.json +++ b/packages/react-native-babel-preset/package.json @@ -13,7 +13,7 @@ ], "license": "MIT", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "main": "src/index.js", "files": [ diff --git a/packages/react-native-babel-transformer/package.json b/packages/react-native-babel-transformer/package.json index 47b0e806295..bf1b5220911 100644 --- a/packages/react-native-babel-transformer/package.json +++ b/packages/react-native-babel-transformer/package.json @@ -14,7 +14,7 @@ ], "license": "MIT", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "main": "src/index.js", "files": [ diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 85f232c1f50..812ac8b9193 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -18,7 +18,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "scripts": { "build": "yarn clean && node scripts/build.js --verbose", diff --git a/packages/react-native-compatibility-check/package.json b/packages/react-native-compatibility-check/package.json index be52c0e76cc..382f73deb27 100644 --- a/packages/react-native-compatibility-check/package.json +++ b/packages/react-native-compatibility-check/package.json @@ -19,7 +19,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "exports": { ".": "./src/index.js", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index e3ab92c4794..f77895440f3 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -21,7 +21,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "bin": { "react-native": "cli.js" diff --git a/packages/rn-tester/package.json b/packages/rn-tester/package.json index 7192bb0996b..a97bcf71c3d 100644 --- a/packages/rn-tester/package.json +++ b/packages/rn-tester/package.json @@ -10,7 +10,7 @@ "directory": "packages/rn-tester" }, "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "scripts": { "start": "react-native start", diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index 32c9776ba6f..9c160d10b01 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -17,7 +17,7 @@ ], "bugs": "https://github.com/facebook/react-native/issues", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "exports": { ".": { diff --git a/private/helloworld/package.json b/private/helloworld/package.json index 136b52a3e7a..fa92cde3b96 100644 --- a/private/helloworld/package.json +++ b/private/helloworld/package.json @@ -33,6 +33,6 @@ "rxjs": "^7.8.1" }, "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" } } diff --git a/private/react-native-bots/package.json b/private/react-native-bots/package.json index 471c2ef3c24..db135b0745a 100644 --- a/private/react-native-bots/package.json +++ b/private/react-native-bots/package.json @@ -4,7 +4,7 @@ "private": true, "license": "MIT", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "devDependencies": { "@rnx-kit/rn-changelog-generator": "^0.4.0", diff --git a/private/react-native-codegen-typescript-test/package.json b/private/react-native-codegen-typescript-test/package.json index a08ab1b3230..a585e515679 100644 --- a/private/react-native-codegen-typescript-test/package.json +++ b/private/react-native-codegen-typescript-test/package.json @@ -5,7 +5,7 @@ "description": "TypeScript related unit test for @react-native/codegen", "license": "MIT", "engines": { - "node": ">= 20.19.4" + "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" }, "scripts": { "build": "yarn clean && node scripts/build.js --verbose && tsc",