Skip to content

pnpm does not relink workspace packages when publishConfig.linkDirectory changes #14488

Description

@eblocha

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

12.1.0

Which area(s) of pnpm are affected? (leave empty if unsure)

Lockfile

Link to the code that reproduces this issue or a replay of the bug

https://github.com/eblocha/pnpm-link-directory

Reproduction steps

The linked repo is set up to reproduce by running pnpm i. It will link project-a's dist instead of the source.

Set up a workspace where project-b depends on project-a, and project-a uses publishConfig.directory pointed at dist.

Run pnpm i

Now change project-a to set publishConfig.linkDirectory to false, then rerun pnpm i

The dist directory under project-a is still linked in project-b's node_modules, and the lockfile is unchanged.

Describe the Bug

pnpm does not recheck publishConfig.linkDirectory when running pnpm i.

Expected Behavior

pnpm i should update the lockfile + workspace layout to link to the correct location specified. If --frozen-lockfile is used, the command should fail if the location in the lockfile and the location described by publishConfig do not match.

Which Node.js version are you using?

24.20.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions