lerna publish fails with latest version(v5.0.0)
See original GitHub issuelerna publish from-package --dist-tag latest --yes --no-verify-access
This is the command that is used to publish to npm. This used to work before v5.0.0.
Expected Behavior
Publish packages to npm without any errors.
Current Behavior
The publish command fails at prepare npm lifecycle which internally calls build command.
lerna run build --stream
does work.
Additional Info:
I have multiple packages in the repo. There is a package A that is dependent on package B. The folder name of package B is different from that of the package name mentioned in package.json.
In the publish command, it is trying to get the package from npm via folder name instead of package name from package.json which is resulting in 404. It should not be trying to fetch from npm as the version of that package is not yet published. it is just updated with lerna version
locally.
This used to work in previous version of lerna. Just updated to latest yesterday and this is broken.
lerna.json
{ "packages": ["packages/*", "apps/*"], "version": "independent", "npmClient": "yarn", "useWorkspaces": true, "useNx": true, "command": { "version": { "message": "build: update version" }, "publish": { "registry": "https://registry.npmjs.org/" } } }
<!-- Please paste your `lerna.json` here -->
Context
Your Environment
Executable | Version |
---|---|
lerna --version |
5.0.0 |
npm --version |
8.5.5 |
yarn --version |
v1.22.18 |
node --version |
16.15.0 |
OS | Version |
---|---|
NAME | VERSION |
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5
Top GitHub Comments
Great, thanks for confirming @raviteja83! Sorry for the issue
Working with 5.3.0