From a8539190fea3a4dfbdea07404cbbe53da132a07d Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Wed, 6 Aug 2025 08:19:47 -0700 Subject: [PATCH] fix(codegen): fix missing dependencies (#52884) Summary: `react-native/codegen` uses `babel/parser` and `babel/core` but does not declare dependency on them. Depending on how packages are hoisted (and especially in pnpm setups), this causes crashes during codegen. Resolves https://github.com/facebook/react-native/issues/52883 ## Changelog: [GENERAL] [FIXED] - Add missing Babel dependencies Pull Request resolved: https://github.com/facebook/react-native/pull/52884 Test Plan: See https://github.com/facebook/react-native/issues/52883 Reviewed By: cortinico, christophpurrer Differential Revision: D79103092 Pulled By: robhogan fbshipit-source-id: ecaf690f994393a652ea7f0d4f30bbabeb23a434 --- packages/react-native-codegen/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index 23312522963..8ba2938a3d6 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -29,6 +29,8 @@ "lib" ], "dependencies": { + "@babel/core": "^7.25.2", + "@babel/parser": "^7.25.3", "glob": "^7.1.1", "hermes-parser": "0.25.1", "invariant": "^2.2.4",