这是indexloc提供的服务,不要输入任何密码
Skip to content

Support pnpm.ignoreOptionalDependencies when pruning lockfile #8959

@GeorgS

Description

@GeorgS

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/GeorgS/turbo-reproduce-ignored-optional-dependencies

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

2.0.12

Describe the Bug

When using pnpm.ignoredOptionalDependencies in package.json and then pruning the lockfile, the ignoredOptionalDependencies key is not present in the pruned pnpm-lock.yaml.

This results in an error when trying to install using pnpm install --frozen-lockfile:

ERR_PNPM_LOCKFILE_CONFIG_MISMATCH  Cannot proceed with the frozen installation.
The current "ignoredOptionalDependencies" configuration doesn't match the value found in the lockfile

Update your lockfile using "pnpm install --no-frozen-lockfile"

This is how it is defined in the original pnpm-lock.yaml: https://github.com/GeorgS/turbo-reproduce-ignored-optional-dependencies/blob/main/pnpm-lock.yaml#L148-L149

Expected Behavior

The ignoredOptionalDependencies is carried over from the original lockfile.

To Reproduce

  • turbo prune app-a --docker
  • cd out/json
  • pnpm install --frozen-lockfile

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't workingneeds: triageNew issues get this label. Remove it after triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions