nx-release doesn't release packages using a local dependency protocol outside of ppm
Opened this issue · 0 comments
Saadnajmi commented
Current Behavior
We recently migrated our repo to use nx-release (microsoft/react-native-macos@dde6d80), and attempted a publish but got the following warning:
nx run react-native-macos:nx-release-publish
Error: Cannot publish package "react-native-macos" because it contains a local dependency protocol in its "dependencies", and your package manager is yarn.
The issue is we use workspace:*
for dependencies within our monorepo, and nx-release says Yarn doesn't support that. However, since Yarn 2+ (We're on Yarn 4.5.1), Yarn does support workspace dependencies, so I think this error is incorrect
Expected Behavior
nx-release can publish from a Yarn 4 repo with local/workspace dependencies.
GitHub Repo
https://github.com/microsoft/react-native-macos
Steps to Reproduce
- Attempt to run
yarn nx-release
on our release branch (0.76-stable)
Nx Report
NX Report complete - copy this into the issue template
Node : 20.16.0
OS : darwin-arm64
Native Target : aarch64-macos
yarn : 4.5.1
nx : 20.0.7
@nx/js : 20.0.7
@nx/workspace : 20.0.7
@nx/devkit : 20.0.7
typescript : 5.0.4
Failure Logs
Error: Cannot publish package "react-native-macos" because it contains a local dependency protocol in its "dependencies", and your package manager is yarn.
Please update the local dependency on "@react-native-mac/virtualized-lists" to be a valid semantic version (e.g. using `nx release`) before publishing, or switch to pnpm as a package manager, which supports dynamically replacing these protocols during publishing.
NX Running target nx-release-publish for 2 projects and 12 tasks they depend on failed
Failed tasks:
- react-native-macos:nx-release-publish
Package Manager Version
Yarn 4.5.1
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
No response