Skip to content

Report an actionable error when '@react-native/codegen' is not built - #59523

Open
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D127711037
Open

christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D127711037

Conversation

@christophpurrer

Copy link
Copy Markdown
Contributor

Summary:
When react-native/codegen is checked out from source but never built, babel-plugin-codegen failed with a bare Cannot find module .../lib/... deep inside Babel preset loading. Catch the failed lib/ fallback and name the fix, keeping the original failure as cause. A missing install and a broken lib/ build report separately. Adds codegen-load-test.js covering all three failures.

Changelog:
[General][Fixed] - Show an actionable error when react-native/codegen is not built

Differential Revision: D127711037

Summary:
When `react-native/codegen` is checked out from source but never built, `babel-plugin-codegen` failed with a bare `Cannot find module .../lib/...` deep inside Babel preset loading. Catch the failed `lib/` fallback and name the fix, keeping the original failure as `cause`. A missing install and a broken `lib/` build report separately. Adds `codegen-load-test.js` covering all three failures.

Changelog:
[General][Fixed] - Show an actionable error when `react-native/codegen` is not built

Differential Revision: D127711037
@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 Oct 27, 2026
@meta-codesync

meta-codesync Bot commented Oct 27, 2026

Copy link
Copy Markdown

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

This branch has not been deployed

No deployments
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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant