Skip to content

Conversation

@kikils
Copy link

@kikils kikils commented Dec 18, 2025

What

  • Fix npm ci failures on npm 11 by updating package-lock.json.

Repro

Details
$ docker run --rm -it -v "$PWD:/work" -w /work node:20.19.5 bash    
root:/work# npm i -g [email protected]

removed 45 packages, and changed 107 packages in 5s

16 packages are looking for funding
  run `npm fund` for details
root:/work# node -v & npm -v
[1] 21
v20.19.5
11.7.0
[1]+  Done                    node -v
root:/work# rm -rf node_modules/
root:/work# npm ci
npm error code EUSAGE
npm error
npm error `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.
npm error
npm error Missing: [email protected] from lock file
npm error
npm error Clean install a project
npm error
...

Fix / Validation

  • After updating package-lock.json, npm ci succeeds with npm 11.7.0.
Details
root:/work# npm install --package-lock-only
...
up to date, audited 898 packages in 3s
...
root:/work# git diff
diff --git a/package-lock.json b/package-lock.json
index 480303a..7619aa5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4906,6 +4906,21 @@
       "dev": true,
       "license": "ISC"
     },
+    "node_modules/fsevents": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+      "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzl
hffQw==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+      }
+    },
     "node_modules/function-bind": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",

root:/work# rm -rf node_modules
root:/work# npm ci
...
added 897 packages, and audited 898 packages in 2m
...
  • npm ci also succeeds with npm 10.x.
Details
$ docker run --rm -it -v "$PWD:/work" -w /work node:20.19.5 bash
root:/work# npm i -g npm@10

removed 14 packages, and changed 100 packages in 6s
...
root:/work# npm -v
10.9.4
root:/work# git diff
diff --git a/package-lock.json b/package-lock.json
index 480303a..7619aa5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4906,6 +4906,21 @@
       "dev": true,
       "license": "ISC"
     },
+    "node_modules/fsevents": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+      "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzl
hffQw==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+      }
+    },
root@e8da3bf1803a:/work# rm -rf node_modules/
root@e8da3bf1803a:/work# npm ci
...
added 897 packages, and audited 898 packages in 2m
...

Related

Note

This PR also includes a formatting-only change to renovate.json5 to satisfy pre-commit hooks.

@kikils kikils marked this pull request as ready for review December 18, 2025 12:55
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