Pin @wordpress/react-i18n to 4.47.0 to fix trunk bundling install (ERESOLVE) - #3985
Merged
Conversation
epeicher
approved these changes
Jun 29, 2026
Contributor
There was a problem hiding this comment.
Thanks @bcotrim for fixing this! I can confirm that I can run the cd apps/studio && npm install --omit=dev --no-audit --no-fund --no-package-lock --no-progress --install-links --no-workspaces --dry-run script without any errors, while I have the ERESOLVE error in trunk for the same command. I agree that this PR can be merged with the error in the Performance Metrics check as it runs against trunk that errors. LGTM!
1 task
1 task
gcsecsey
pushed a commit
that referenced
this pull request
Jun 29, 2026
…ESOLVE) (#3985) ## Related issues - Related to STU-1938 (surfaced while working on it; this is a standalone trunk fix) ## How AI was used in this PR Used Claude Code to diagnose the CI failure: probed the npm registry to find the offending `@wordpress/react-i18n` version, reproduced the `install:bundle` ERESOLVE locally via a dry-run, and confirmed via GitHub commit statuses that trunk itself is red. The diff was reviewed by the author. ## Proposed Changes **Trunk is currently red** (E2E + Performance Metrics) and has been since `167141e6f` — every build fails in the `prePackage` hook with: ``` npm error ERESOLVE Found: react@19.2.7 peer react@"^18.0.0" from @wordpress/react-i18n@4.49.0 ``` Root cause: `apps/studio`'s `install:bundle` runs `npm install --no-package-lock`, so it ignores the lockfile and re-resolves `@wordpress/react-i18n: ^4.47.0` against the live registry on every build. `react-i18n@4.48.0`/`4.49.0` added a `react@^18` peer, which conflicts with the repo's react 19 (since #3642). `4.47.0` is the last version with no react peer; the lockfile already pins it, which is why dev, lint, and unit tests pass — only the lockfile-less bundling install floats and breaks. This pins `@wordpress/react-i18n` to exact `4.47.0` in `apps/studio` and `apps/ui` (matching the exact-pin convention already used there for other `@wordpress/*` packages) so the bundling install can no longer float to the broken version. Behavior-neutral — dev already runs 4.47.0. > Note: the **Performance Metrics** check on *this* PR will still show red, because that job builds the current (still-broken) trunk as its comparison baseline. That clears automatically once this lands on trunk. Since trunk is already red, merging this is strictly an improvement. ## Testing Instructions - `git checkout` this branch and run the exact bundling install that CI runs: ``` cd apps/studio && npm install --omit=dev --no-audit --no-fund --no-package-lock --no-progress --install-links --no-workspaces --dry-run ``` It should exit 0 with no `npm error ERESOLVE` (only benign peer-override warnings). - On `trunk` the same command fails with the ERESOLVE above. ## Pre-merge Checklist - [x] Have you checked for TypeScript, React or other console errors?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
How AI was used in this PR
Used Claude Code to diagnose the CI failure: probed the npm registry to find the offending
@wordpress/react-i18nversion, reproduced theinstall:bundleERESOLVE locally via a dry-run, and confirmed via GitHub commit statuses that trunk itself is red. The diff was reviewed by the author.Proposed Changes
Trunk is currently red (E2E + Performance Metrics) and has been since
167141e6f— every build fails in theprePackagehook with:Root cause:
apps/studio'sinstall:bundlerunsnpm install --no-package-lock, so it ignores the lockfile and re-resolves@wordpress/react-i18n: ^4.47.0against the live registry on every build.react-i18n@4.48.0/4.49.0added areact@^18peer, which conflicts with the repo's react 19 (since #3642).4.47.0is the last version with no react peer; the lockfile already pins it, which is why dev, lint, and unit tests pass — only the lockfile-less bundling install floats and breaks.This pins
@wordpress/react-i18nto exact4.47.0inapps/studioandapps/ui(matching the exact-pin convention already used there for other@wordpress/*packages) so the bundling install can no longer float to the broken version. Behavior-neutral — dev already runs 4.47.0.Testing Instructions
git checkoutthis branch and run the exact bundling install that CI runs:npm error ERESOLVE(only benign peer-override warnings).trunkthe same command fails with the ERESOLVE above.Pre-merge Checklist