`npm update react --package-lock-only` fails with ERESOLVE where `npm update --package-lock-only` succeeds
Los mantenedores suelen responder en 2 días
@Doomguy-BFG9000 ya está trabajando en esto.
Desde el 8/11/2026.
- #10262 de @Doomguy-BFG9000 — abierto
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 53/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js
Línea de trabajo
Start by reproducing the failure in npm 11.19.0 with the supplied repository commit and compare the named-package update with the bare update. Trace how npm resolves peer dependencies when package names are supplied to npm update --package-lock-only, then identify the relevant tests and add coverage for this lockfile-only case. Done means naming react succeeds and preserves the root pin at 18.3.1.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
- npm 11.19.0, node v24.21.0, Linux x86_64
Steps to reproduce
Public repo storytold/artcraft at 1f969a9224934a55417daf10359a6fb1458b63f4, directory frontend/. The root package.json pins "react": "18.3.1" exactly. The workspace apps/artcraft depends on "react": "^18.2.0" and "@preact/signals-react": "^2.0.1", whose peer range is react@"^16.14.0 || 17.x || 18.x || 19.x".
git clone https://github.com/storytold/artcraft && cd artcraft/frontend
git checkout 1f969a9224934a55417daf10359a6fb1458b63f4
npm update --package-lock-only --ignore-scripts # exit 0
git checkout -- package-lock.json
npm update react --package-lock-only --ignore-scripts # exit 1, ERESOLVE
Expected
Naming react updates no more than a plain npm update does. The project's own react requirements are 18.3.1 (root) and ^18.2.0 (workspace), so the result should keep react 18.3.1, as plain npm update does without error.
Actual
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error While resolving: @preact/[email protected]
npm error Found: [email protected]
npm error react@"18.3.1" from the root project
...
npm error Conflicting peer dependency: [email protected]
npm error peer react@"^16.14.0 || 17.x || 18.x || 19.x" from @preact/[email protected]
npm error apps/artcraft/node_modules/@preact/signals-react
With react named, npm appears to choose [email protected] (the latest the peer range allows) for the peer edge, then rejects it against the root's exact pin. Naming react-dom or @preact/signals-react alone succeeds.
Context
We name every declared registry package (npm update a b c ...) instead of running a bare npm update so that Git dependencies stay at their locked commits. That makes the named form the only one available to us when a lock has Git dependencies.
Found by an automated test of a dependency-update tool across public repositories.
- Lenguaje dominante
- JavaScript
- Estrellas
- 10.3k
- Forks
- 5k
- Merge medio
- 4 d 11 h
- PR fusionados (30 d)
- 26
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de npm/cli
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
[BUG] scripts/dependency-graph.js splits npm-cli-repos.txt on os.EOL, so DEPENDENCIES.md depends on the checkout's line endingsPosiblemente ocupada @saruk-vedant la tomó hace 7 días. AbiertoBug Needs Triage Triage Requested
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
npm/cli#10316 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[BUG] npm pkg delete removes the first array item for a nonexistent propertyPosiblemente ocupada @drawliin la tomó hace 42 días. Abiertocmd:delete Priority 3
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 2 días
-
create node pr: Node.js 20 deprecation & `DEP0040` warnings loggedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. AbiertoEngineering Priority 1
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
Los mantenedores suelen responder en 2 días
-
`npm audit signatures` does not report how many packages it skipped for want of registry keysPosiblemente ocupada @greenlincoln05 la tomó hace 63 días. AbiertoPriority 3
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
npm/cli#10018 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Issues similares
-
docs: add SECURITY.md vulnerability reporting policyPosiblemente ocupada @AK-Lmn la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
flisk-sh/linux2wasm#12 ·
Los mantenedores suelen responder en 1 día
-
possible bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Mintplex-Labs/anything-llm#7388 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 60/100
Los mantenedores suelen responder en 1 día
-
v6: Minified bootstrap.min.css is missing header infoPosiblemente ocupada @lazerg la tomó hoy. Abiertobug build confirmed has-pr v6
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
[workshop-sync] workshop/side-quest-26-01-forecast-costs.md: forecast default history window is inaccuratePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
githubnext/gh-aw-workshop#6332 ·
Los mantenedores suelen responder en 1 día