Skip to content

publishDirectory appears to break monorepos #5115

@antony

Description

@antony

pnpm version: 7.7.0

The addition of publishDirectory to the lockfile, and subsequent pointing of devDependencies to publish directories breaks monorepos where builds are required to publish the dependencies.

Often, the publishDirectory doesn't exist at development time.

Code to reproduce the issue:

Working on a repro, but offering this as a heads-up whilst that happens.

Expected behavior:

'@beyonk/brand': link:../../components/brand

With pnpm < 7.7.0, dependencies within the lockfile point to the development files, not the published files, which might not yet have been built. They certainly aren't build during development, because it would require running (for example) the svelte-kit package command on every change.

Package is run at build time, on CI, and may not even exist locally.

pnpm does not point dev dependencies to published directories.

Actual behavior:

'@beyonk/brand': link:../../components/brand/package

pnpm adds publishDirectory: package to the lockfile, and points the dependency path to the publishDirectory.

Additional information:

  • node -v prints: v16.15.0
  • Windows, macOS, or Linux?: Linux
  • SvelteKit, pnpm 7.7.0, monorepo.

Metadata

Metadata

Assignees

Labels

area: monorepoEverything related to the pnpm workspace featuretype: bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions