Skip to content

--frozen-lockfile fails #4454

@BorntraegerMarc

Description

@BorntraegerMarc

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

bug

What is the current behavior?
I have the following package.json:

{
    "flat": true,
    "dependencies": {
        "some-dep-using-lodash": "V1"
        "some-other-dep-using-lodash": "V1"
    },
    "resolutions": {
        "lodash": "4.17.4",
}

When I run yarn it generates the following yarn.lock:

lodash@3.9.3, lodash@4.16.2, lodash@4.17.4, lodash@^3.0.0, lodash@^3.0.1, lodash@^3.10.1, lodash@^3.8.0, lodash@^4.0.0, lodash@^4.11.1, lodash@^4.14.0, lodash@^4.16.6, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.8.0, lodash@~4.17.4:
  version "4.17.4"
  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"

But then when our CI runs yarn --frozen-lockfile we get the output:

D:\projects\komed-health-web>yarn --frozen-lockfile
yarn install v1.0.2
[1/4] Resolving packages...
warning Lockfile has incorrect entry for "lodash@^3.8.0". Ignoring it.
warning Lockfile has incorrect entry for "lodash@^3.10.1". Ignoring it.
warning Lockfile has incorrect entry for "lodash@^3.0.0". Ignoring it.
warning Lockfile has incorrect entry for "lodash@4.16.2". Ignoring it.
warning Lockfile has incorrect entry for "lodash@^3.0.1". Ignoring it.
warning Lockfile has incorrect entry for "lodash@3.9.3". Ignoring it.

error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

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

run yarn once to generate lock file and then yarn --frozen-lockfile
What is the expected behavior?
I'm not sure if it is a bug. First of all: What do the warning messages mean?
But my guess is if you have warnings then yarn --frozen-lockfile should not fail, right?

I'm 100% sure the dependencies are the same when running yarn and yarn --frozen-lockfile. I ran them 10 sec after each other.

Please mention your node.js, yarn and operating system version.
Node: v6.9.1
yarn: 1.0.2
Windows + Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions