question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lerna publish flag `--conventional-commits` doesn't work with `--npm-tag` flag

See original GitHub issue

Expected Behavior

I have one project that have one trunk branch to release with dist-tag latest. For next major version, there is another branch task/v3 to release with dist-tag v3.

The script is like below:

lerna publish --conventional-commits --exact --npm-tag=v3

It is expected to publish all packages with conventional-commits and on dist-tag v3.

Current Behavior

The script failed with message like below:

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! publish:v3: lerna publish --conventional-commits --exact --npm-tag=v3 npm ERR! Exit status 1

Possible Solution

It looks that the two flags --conventional-commits and --npm-tag are not compatible.

Your Environment

Executable Version
lerna --version 3.0.0-beta.21
npm --version 5.6.0
node --version v6.13.0
OS Version
macOS Sierra 10.13.5

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
evocateurcommented, Jan 4, 2019

Would you believe I had no tests around the presence or absence of publishConfig.tag?

Narrator: He didn’t.

1reaction
evocateurcommented, Jan 4, 2019

Coincidentally, I’m working on making --npm-tag override publishConfig.tag when it is not latest, which I think makes more sense, especially in the --canary case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@lerna/version - npm
For projects using conventional commits, use the following flags for prerelease management: --conventional-prerelease : release current changes ...
Read more >
javascript - Can Lerna bump prerelease version according to ...
I used the following command: lerna publish --conventional-commits --conventional-prerelease. The version bumps for these flags are ...
Read more >
A Beginner's Guide to Lerna with Yarn Workspaces | by jsilvax
Lerna makes versioning and publishing packages to an NPM Org a… ... Note, that we configured the conventional commits and “yes” flag in...
Read more >
@lerna/publish | Yarn - Package Manager
See Conventional Commits for commit guidelines. 6.0.3 (2022-11-07). Bug Fixes. publish: support inconsistent workspace prefix usage (#3413 (da2274b) ...
Read more >
Version and Publish - Lerna
Lerna can increment your package's versions as well as publish your packages to NPM, and it provides a variety of options to make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found