Skip to content

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

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

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

Conversation

@christophpurrer

@christophpurrer christophpurrer commented Oct 27, 2026 •

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

@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.

@meta-codesync meta-codesync Bot changed the title Report an actionable error when '@react-native/codegen' is not built Report an actionable error when '@react-native/codegen' is not built (#59523) Oct 28, 2026
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 28, 2026
…eact#59523)

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
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 28, 2026
…eact#59523)

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
@github-actions

Copy link
Copy Markdown

Visual regression

3 visual difference(s) at 3ae281c768f6. Visual differences need maintainer approval. Review the report, then apply visual-change-approved.

ios button/default-styling/default: Changed, 38223 px (1.533%)

diff

Expected and Captured
Expected Captured
expected captured

ios touchable/feedback-events/pressed: Changed, 1620 px (0.285%)

diff

Expected and Captured
Expected Captured
expected captured

ios touchable/highlight/default: Changed, 42 px (0.039%)

diff

Expected and Captured
Expected Captured
expected captured

…eact#59523)

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
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