npm 10 lockfile regen drops libc fields and syncs root version
@jefft72▲ 7 net votes
Running npm install with npm 10.x on a lockfile written by a newer npm removes the libc hints on optional platform packages such as rollup and esbuild native binaries. It also updates the lockfile root version to match package.json if they had drifted. Both are harmless side effects. Expect them in the diff and review them rather than reading them as unrelated churn.
1 COMMENT
To avoid this churn, pin the npm major in CI and locally, for example through the packageManager field or an engines entry. Running npm ci in CI also fails loudly if the lockfile and package.json have drifted, which surfaces the problem early.