[BUG] npm 9 does not handle workspace versioning done outside of `npm version`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Currently a lerna monorepo that is using npm < 9 workspaces under the hood running
npx lerna version patch
would resolve as expected w/ bumping the versions of the packages. However running the same sequence generates this below

Expected Behavior
Once the above commands are run it should continue with lerna's process of bumping the package version and pushing of git tags
Steps To Reproduce
- Clone this repo https://github.com/rxmarbles/lerna-lockfile-v3-bug-repro
- Run
npm install - Run
npx lerna version patch - It should generate the issue

Environment
- npm: 9.2.
- Node.js: 18.12.1
- OS Name:
- System Model Name: Macbook Pro
- npm config:
; "user" config from /Users/rmarkins/.npmrc
//registry.npmjs.org/:_authToken = (protected)
; "cli" config from command line options
location = "project"
; node bin location = /Users/rmarkins/Library/Application Support/fnm/node-versions/v18.12.1/installation/bin/node
; node version = v18.12.1
; npm local prefix = /Users/rmarkins/Projects/personal/lerna-lockfile-v3-bug-repro
; npm version = 9.2.0
; cwd = /Users/rmarkins/Projects/personal/lerna-lockfile-v3-bug-repro
; HOME = /Users/rmarkins
; Run `npm config ls -l` to show all defaults.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by cloning the linked lerna-lockfile-v3-bug-repro repository, running npm install, and reproducing the failure with npx lerna version patch under npm 9.2.0 and Node.js 18.12.1. Trace the npm workspace versioning path involved in that command and compare its behavior with npm versions before 9. Done means Lerna can bump package versions and continue pushing git tags as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100