Repository navigation
[BUG] Need to run npm install twice to fix npm ci command #7793
Copy link
Copy link
Closed as not planned
Labels
Bugthing that needs fixingthing that needs fixingDuplicateduplicate of another, existing issueduplicate of another, existing issue
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
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 Invalid: lock file's yaml@1.10.2 does not satisfy yaml@2.5.1
npm error Missing: yaml@1.10.2 from lock fileExpected Behavior
npm ci should install packages without exception
Steps To Reproduce
Download repro repository: https://github.com/Saibamen/npm-double-install-bug
- Delete
package-lock.json npm installnpm ci
See errors
Building with commited lock file (created on Windows) and npm ci:
Building with fresh lock file, npm install and then npm ci
Annoying workarounds
Workaround v1
npm install- Delete
node_modules npm installnpm ci
Workaround v2
Just run npm install twice, no need to delete node_modules.
npm installnpm installnpm ci
Environment
- npm:
10.8.3 - Node.js:
20.17.0 - OS Name: Windows 10
- System Model Name:
10.0.19045.4894 - npm config:
; node bin location = C:\Program Files\nodejs\node.exe
; node version = v20.17.0
; npm local prefix = C:\XXX\npm-double-install-bug
; npm version = 10.8.3
; cwd = C:\XXX\npm-double-install-bug
; HOME = C:\Users\YYY
; Run `npm config ls -l` to show all defaults.Diff after running npm install second time:
diff --git a/package-lock.json b/package-lock.json
index 07842ff..4823f0c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1606,6 +1606,16 @@
}
}
},
+ "node_modules/eslint-plugin-svelte/node_modules/yaml": {
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
+ "dev": true,
+ "license": "ISC",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/eslint-scope": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
@@ -3528,21 +3538,6 @@
}
}
},
- "node_modules/svelte-check/node_modules/yaml": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz",
- "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==",
- "dev": true,
- "license": "ISC",
- "optional": true,
- "peer": true,
- "bin": {
- "yaml": "bin.mjs"
- },
- "engines": {
- "node": ">= 14"
- }
- },
"node_modules/svelte-eslint-parser": {
"version": "0.41.1",
"resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.41.1.tgz",
@@ -3737,19 +3732,6 @@
"url": "https://github.com/sponsors/antonk52"
}
},
- "node_modules/tailwindcss/node_modules/yaml": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz",
- "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "yaml": "bin.mjs"
- },
- "engines": {
- "node": ">= 14"
- }
- },
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -4067,13 +4049,16 @@
"license": "ISC"
},
"node_modules/yaml": {
- "version": "1.10.2",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
- "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz",
+ "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==",
"dev": true,
"license": "ISC",
+ "bin": {
+ "yaml": "bin.mjs"
+ },
"engines": {
- "node": ">= 6"
+ "node": ">= 14"
}
},
"node_modules/yocto-queue": {Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingDuplicateduplicate of another, existing issueduplicate of another, existing issue
Activity
milaninfy commentedon Sep 26, 2024
Closing: this looks to be similar if not a duplicate of an existing issue, #6787. If you believe your instance is unique, please provide further clarifying details.
Use npm install instead of npm ci - workaround for npm/cli#7793 bund…