You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] npm install installs an invalid tree (as validated by npm ci) #5854
> npm install @pmmmwh/react-refresh-webpack-plugin@0.5.9 read-pkg-up@7.0.1
added 135 packages in 6s
This command exits without error, and correctly installs to node_modules/ and package-lock.json. However, the resulting tree is invalid, according to npm ci:
❯ npm ci
npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
The second commit is the result of running npm install again. This updates the package lock to a valid tree, and npm ci now completes successfully.
Expected Behavior
It shouldn't be necessary to run npm install twice to get a valid tree.
Steps To Reproduce
See current behavior for a minimal repro repository.
@pmmmwh/react-refresh-webpack-plugin is asking for a peerDependency of type-fest that is incompatible with what read-pkg-up is asking for as a dependency. npm is hoisting what read-pkg-up wants, colliding w/ what @pmmmwh/react-refresh-webpack-plugin wants as its peer dep
Activity
wraithgar commentedon Nov 17, 2022
@pmmmwh/react-refresh-webpack-pluginis asking for apeerDependencyoftype-festthat is incompatible with whatread-pkg-upis asking for as adependency. npm is hoisting whatread-pkg-upwants, colliding w/ what@pmmmwh/react-refresh-webpack-pluginwants as its peer depSaibamen commentedon Feb 19, 2026
Tested with #8981:
npm ci: OK (both from 11.10.0 and PR #8981 (448db52))npm ls(the same output for both versions):git diff between
package-lock.jsonfiles from the firstnpm install- NPM 11.10.0 vs NPM from PR #8981 (448db52):Saibamen commentedon Feb 19, 2026
Fixed in NPM 11.10.1. Please update your NPM:
npm install -g npm@latest