Skip to content

yarn install --frozen-lockfile is not failing as expected #5840

@DavideDaniel

Description

@DavideDaniel

Do you want to request a feature or report a bug?

Bug

What is the current behavior?
yarn install --frozen-lockfile does not generate a new yarn.lock but it does NOT fail as expected.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Have a yarn.lock with a package.json with some dependencies and no diffs.
  2. Remove a dependency in your package.json (npm uninstall --save something)
  3. yarn install --frozen-lockfile proceeds with install instead of failing as docs say, and does not generate a new yarn.lock to reflect the change in package.json.

What is the expected behavior?
Per docs: Don’t generate a yarn.lock lockfile and fail if an update is needed.
It should fail as expected as CI builds need to break earlier rather than wait for build and then fail on a missing or mismatched dependency.

Please mention your node.js, yarn and operating system version.
Node 8.9.1 | 9.6.1
npm 3.10.10 | 5.6.0
MacOS 10.12.6

Metadata

Metadata

Assignees

Labels

fixed-in-modernThis issue has been fixed / implemented in Yarn 2+.triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions