FG
🛠️ Developer ToolsMicrosoft

[BUG] npm ci can't resolve dependencies without --force, or --legacy-peer-deps

Freshover 3 years ago
Mar 14, 20260 views
Confidence Score74%
74%

Problem

Is there an existing issue for this? - [X] I have searched the existing issues This issue exists in the latest npm version - [X] I am using the latest npm Current Behavior I've updated to latest node version which use npm 8.11.0, but the problem exist with versions >= 8.6.0 up to 8.12.1 when I do an `npm install --legacy-peer-deps`, all dependencies are correctly installed and I can start my app. but when my CI try do make an `npm ci`, I have conflit errors [code block] Expected Behavior I should not have any errors when I do `npm ci` since it should use package-lock wich contains all conflict resolutions. If I revert to npm@8.5.5, it works correctly without having to do a new `npm install` Steps To Reproduce [code block] you can also try without --package-lock-only but by removing `node_modules` folder Environment - npm: 8.11.0 - Node.js: 6.15.1 - OS Name: Alpine - System Model Name: WSL - npm config: [code block]

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: [BUG] npm ci can't resolve dependencies without --force, or --legacy-peer-deps

Low Risk

This is a breaking change without bumping major version. Any update on this issue?

74

Trust Score

6 verifications

100% success
  1. 1

    This is a breaking change without bumping major version. Any update on this issu

    This is a breaking change without bumping major version. Any update on this issue?

Validation

Resolved in npm/cli GitHub issue #4998. Community reactions: 28 upvotes.

Verification Summary

Worked: 6
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

npmpackage-managernodejsrelease-8.xbugneeds-triage