You update a utility package, forget to bump the version in the three apps that depend on it, and suddenly everyone's CI is broken with Cannot resolve module '@company/utils@1.2.3'
. You spend 2 hours figuring out which packages need version bumps and which order to publish them without breaking npm installs.
Lerna solves the specific pain of coordinating releases. It tracks which packages changed, bumps versions automatically, and publishes in dependency order so Package A doesn't go live before Package B when A depends on B. The React team uses it because managing dozens of packages manually is impossible.
The Publishing Pain Points That Will Bite You
Version Hell: Miss one dependency bump and you get angry GitHub issues about broken installs. I've seen teams publish something like @company/ui@2.1.0
that depends on @company/utils@1.3.0
, but @company/utils
is still sitting at 1.2.8
or whatever. Users install the new UI and get Module not found
errors. Lerna tracks these relationships so it doesn't happen.
Publishing Order Will Fuck You: Publish Package A before Package B updates its dependency on A, and npm users get 30 seconds of broken installs. Enough time for your Slack to blow up with "build is broken" messages. Lerna calculates the dependency graph and publishes in order.
Git Tag Nightmare: Manual tagging means someone uses v1.2.3
, someone else uses 1.2.3
, and your changelog generation breaks. Lerna creates conventional commit-based tags consistently.
The Nx Integration Reality Check (It's Complicated)
When Nrwl took over Lerna in 2022, they integrated Nx caching. Now your builds are fast when the cache works, but when it doesn't, you'll spend hours debugging why Package A rebuilt when nothing changed. Miss one environment variable in your cache inputs and you get stale builds that pass locally but fail in CI.
The caching hashes file contents and dependencies to store build outputs. Change one file, Nx rebuilds that package plus everything depending on it. The problem is figuring out what counts as an "input" - your source files, yes, but also .env
files, global configs, and whatever random shit your build script reads. Get it wrong and cache keys become useless.
Lerna gets regular updates - version 8.2.4 is current as of 2025 with Node.js 22 support and bug fixes. The documentation is solid, and you can usually get help on Stack Overflow when things break.
Works with conventional commits if your team can be trusted to write commit messages correctly (good luck). Plays nice with GitHub Actions for CI/CD, though you'll spend time debugging why the auth token works locally but fails in CI. Most teams end up adding TypeScript project references, ESLint configs, and Prettier because apparently we love making simple things complicated.