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:
- Install the latest version of NPM (8.5.0)
- Create a project with workspaces, setup changesets and add dependencies from one workspace to another with something like
"foo": "workspace:*"
- 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
- fix: publish in workspace close #4348 — committed to pnpm/pnpm by zkochan 2 years ago
- fix: publish in workspace (#4627) close #4348 — committed to pnpm/pnpm by zkochan 2 years ago
- fix: publish in workspace (#4627) close #4348 — committed to pnpm/pnpm by zkochan 2 years ago
- bump version due to pnpm publish bug https://github.com/pnpm/pnpm/issues/4348 — committed to vlcn-io/vlcn-orm by tantaman 2 years ago
- bump version due to pnpm publish bug https://github.com/pnpm/pnpm/issues/4348 — committed to tantaman/misc by tantaman 2 years ago
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.