Skip to content

Add error when running build script after prepack#55914

Closed
huntie wants to merge 1 commit intofacebook:mainfrom
huntie:export-D95215735
Closed

Add error when running build script after prepack#55914
huntie wants to merge 1 commit intofacebook:mainfrom
huntie:export-D95215735

Conversation

@huntie
Copy link
Copy Markdown
Member

@huntie huntie commented Mar 4, 2026

Summary:
Introduce a clear error message if running yarn build again after yarn prepack (which will have applied the "publishConfig" field to each package.json, just ahead of publishing to npm). This state should never happen in CI or local dev, but can occur if repeat-running yarn test-release-local without yarn test-release-local-clean.

Introducing a validation error is preferable over making this idempotent (logic would be complex + fragile) for this rare + out-of-design edge case.

Changelog: [Internal]

Differential Revision: D95215735

Summary:
Introduce a clear error message if running `yarn build` again after `yarn prepack` (which will have applied the `"publishConfig"` field to each `package.json`, just ahead of publishing to npm). This state should never happen in CI or local dev, but can occur if repeat-running `yarn test-release-local` without `yarn test-release-local-clean`.

Introducing a validation error is preferable over making this idempotent (logic would be complex + fragile) for this rare + out-of-design edge case.

Changelog: [Internal]

Differential Revision: D95215735
@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 Mar 4, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 4, 2026

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

@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 4, 2026

This pull request has been merged in 238bd24.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @huntie in 238bd24

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

@huntie huntie deleted the export-D95215735 branch March 5, 2026 10:33
zoontek pushed a commit to zoontek/react-native that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: facebook#55914

Introduce a clear error message if running `yarn build` again after `yarn prepack` (which will have applied the `"publishConfig"` field to each `package.json`, just ahead of publishing to npm). This state should never happen in CI or local dev, but can occur if repeat-running `yarn test-release-local` without `yarn test-release-local-clean`.

Introducing a validation error is preferable over making this idempotent (logic would be complex + fragile) for this rare + out-of-design edge case.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D95215735

fbshipit-source-id: 5a9be44f0d0ae1f2721eed2b11088466a4ff7f72
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.

3 participants