Skip to content

chore(web-ui): add .npmrc with legacy-peer-deps=true#307

Merged
vporoshok merged 2 commits into
ppfrom
chore/web-ui-npmrc-legacy-peer-deps
Apr 29, 2026
Merged

chore(web-ui): add .npmrc with legacy-peer-deps=true#307
vporoshok merged 2 commits into
ppfrom
chore/web-ui-npmrc-legacy-peer-deps

Conversation

@vporoshok
Copy link
Copy Markdown
Collaborator

@vporoshok vporoshok commented Apr 28, 2026

Summary

  • Add web/ui/.npmrc with legacy-peer-deps=true so any npm install in web/ui/ uses legacy peer-dep resolution automatically.
  • Drop the now-redundant --legacy-peer-deps flag from the ui-install and ui-bump-version targets in Makefile.

Why

web/ui/ has a long-standing peer-dependency conflict between typescript@^5.0.0 (declared at the workspace root) and react-scripts@5.0.1 (used by the react-app workspace, which still pins TypeScript to ^3 || ^4). On modern npm a clean install fails with ERESOLVE:

While resolving: react-scripts@5.0.1
Found: typescript@5.9.3
peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1

We already worked around this in Makefile by passing --legacy-peer-deps, but Renovate drives npm install directly (without that flag) when refreshing package-lock.json after a dependency bump, which causes Renovate to skip the lock-file update and post a comment instead — see e.g. #304.

Committing the flag to .npmrc fixes this for all callers (Renovate, CI, local devs) and removes the need to remember the flag manually. After this lands, Renovate should be able to regenerate web/ui/package-lock.json automatically on the next run.

Test plan

Pin npm to use --legacy-peer-deps for the web/ui workspace so that
both Renovate and any local install pick it up automatically. Without
this, `npm install` in web/ui fails with ERESOLVE because
react-scripts@5.0.1 only allows TypeScript ^3 || ^4 while the root
project depends on typescript@^5.0.0. The Makefile already passes
--legacy-peer-deps for human invocations; this file extends the same
behavior to Renovate's lock-file refresh, unblocking dependency PRs
that need to regenerate package-lock.json.

Made-with: Cursor
The flag is now sourced from web/ui/.npmrc, so passing it explicitly
on the npm command line is redundant. Dropping it keeps a single
source of truth for the install behavior.

Made-with: Cursor
@vporoshok vporoshok merged commit f2cebbb into pp Apr 29, 2026
56 of 57 checks passed
@vporoshok vporoshok deleted the chore/web-ui-npmrc-legacy-peer-deps branch April 29, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant