Skip to content

fix: oom during test template #551 - #182

Closed
abosio wants to merge 2 commits into
mainfrom
abosio/551/fix-template-test-action
Closed

fix: oom during test template #551#182
abosio wants to merge 2 commits into
mainfrom
abosio/551/fix-template-test-action

Conversation

@abosio

@abosio abosio commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

npm was OOMing (~4GB heap) while resolving peer dependency conflicts introduced by recent package releases (eslint 9.39.4, graphql-codegen 7.1.3). The ERESOLVE algorithm's memory use balloons with this many conflicting packages. Using --legacy-peer-deps skips that resolution path, matching the approach already used in the compile-frontend target.


With --legacy-peer-deps, npm ignores peer dependency constraints entirely, so it installs eslint@10.5.0 (latest) and just warns. That's what caused the breakage.

Without --legacy-peer-deps, npm enforces peer deps. When eslint and eslint-config-next land in the same batch (they do — lines 12 and 13 → batch 3 with -n 5), npm resolves eslint to the latest version satisfying all constraints in that batch. The constraint from eslint-config-next (^7||^8||^9) is the binding one, so npm picks the latest eslint 9.x instead of 10.x.

The -n 5 batching is necessary to ensure they're resolved together in one npm install invocation — if eslint were in an earlier batch without eslint-config-next, npm would have no constraint to apply and would install 10.x first. Then when eslint-config-next arrived in a later batch, npm would either ERESOLVE or install a conflicting copy.

npm was OOMing (~4GB heap) while resolving peer dependency
conflicts introduced by recent package releases (eslint 9.39.4,
graphql-codegen 7.1.3). The ERESOLVE algorithm's memory use
balloons with this many conflicting packages. Using
--legacy-peer-deps skips that resolution path, matching the
approach already used in the compile-frontend target.
Installing all packages in one shot causes npm's resolver to
exhaust ~4GB of heap. Batching into groups of 5 keeps each
resolution small enough to complete. Dropping --legacy-peer-deps
restores strict peer dep enforcement, which prevents ESLint 10
from being installed (eslint-config-next constrains to ^9, and
it resolves in the same batch as eslint).
@abosio abosio changed the title fix: add --legacy-peer-deps to init deps #551 fix: oom during test template #551 Jun 21, 2026
@abosio abosio closed this Jul 3, 2026
@abosio
abosio deleted the abosio/551/fix-template-test-action branch July 3, 2026 12:50
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