Skip to content

turbo prune --docker produces broken pnpm lockfile #12002

@kevva

Description

@kevva

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/kevva/turbo-prune-pnpm

Which canary version will you have in your reproduction?

2.8.12-canary.1

Environment information

CLI:
   Version: 2.8.12-canary.1
   Path to executable: ~/Projects/turbo-prune-pnpm/node_modules/.pnpm/turbo-darwin-arm64@2.8.12-canary.1/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Not running
   Package manager: pnpm9

Platform:
   Architecture: aarch64
   Operating system: macos
   WSL: false
   Available memory (MB): 6703
   Available CPU cores: 10

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): iTerm.app
   Terminal program version (TERM_PROGRAM_VERSION): 3.6.6
   Shell (SHELL): /bin/zsh
   stdin: false

Expected behavior

turbo prune app-a --docker should produce a valid pnpm-lock.yaml where all importer references have corresponding package resolutions. When running pnpm install --frozen-lockfile in out/json/ it should succeed.

Actual behavior

The pruned pnpm-lock.yaml retains pkg-a importer entry referencing uuid@11.1.0 (as a devDependency) but omits the uuid@11.1.0 package resolution and snapshot entries. This causes pnpm install --frozen-lockfile to fail:

ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY  Broken lockfile: no entry for 'uuid@11.1.0' in pnpm-lock.yaml

To Reproduce

Run the following:

git clone https://github.com/kevva/turbo-prune-pnpm
cd turbo-prune-pnpm
pnpm install
npx 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 working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions