Skip to content

yarn publish fails with lerna 3 and canary option #6313

@fczuardi

Description

@fczuardi

yarn v1.9.4

Do you want to request a feature or report a bug?

Report a bug.

What is the current behavior?
When using lerna to handle the publishing of multiple packages in a monorepo, using yarn as the npm client, the command lerna publish --canary fails with a New versions must be valid semver error.

The format for such versions are similar to 3.0.36-alpha.36+fca8d96

Here is an example of travis build failing to publish:

https://travis-ci.org/CraveFood/farmblocks/builds/421141905#L2513

lerna ERR! yarn publish --ignore-scripts --tag canary --new-version 3.0.36-alpha.36+fca8d96 --non-interactive crave-farmblocks-alert-3.0.36-alpha.36.tgz stderr:
error Couldn't publish package: "https://registry.npmjs.org/@crave%2ffarmblocks-alert: New versions must be valid semver."

If using npm as the client the publishing works.

lerna publish --canary --npm-client npm

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions