pnpm: Pnpm publish doesn't work correctly with workspaces and npm 8.5.0

(I’m not sure if this issue is related to pnpm or npm)

pnpm version:

6.31.0

Code to reproduce the issue:

  1. Install the latest version of NPM (8.5.0)
  2. Create a project with workspaces, setup changesets and add dependencies from one workspace to another with something like "foo": "workspace:*"
  3. Run all the steps to create a new changeset and run pnpm publish -r

Expected behavior:

Workspace references have been replaced with an actual version in the published package.

Actual behavior:

The published package still contains "workspace:*" as version, making it not installable.

Additional information:

  • When I do a manual pnpm pack the version is being applied
  • Downgrading NPM to version 8.4.1 solves the issue

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 17 (5 by maintainers)

Commits related to this issue

Most upvoted comments

It happened to me, too. What’s the solution

@zkochan I can confirm my issue has been resolved with latest pnpm and node v18! Thanks a lot!

🚢 6.32.11 and v7.0.0-rc.9

I have the same problem, the “workspace:^” not repleaced.