Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npm 9 does not handle workspace versioning done outside of npm version #5967

Open
2 tasks done
rxmarbles opened this issue Dec 14, 2022 · 1 comment
Open
2 tasks done
Labels
Bug thing that needs fixing Priority 1 high priority issue Release 9.x work is associated with a specific npm 9 release

Comments

@rxmarbles
Copy link

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
Screen Shot 2022-12-14 at 12 36 00 PM

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

  1. Clone this repo https://github.com/rxmarbles/lerna-lockfile-v3-bug-repro
  2. Run npm install
  3. Run npx lerna version patch
  4. It should generate the issue
    Screen Shot 2022-12-14 at 12 36 00 PM

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.
@rxmarbles rxmarbles added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Dec 14, 2022
@rxmarbles rxmarbles changed the title [BUG] <title> [BUG] npm 9 blows up during lerna version Dec 14, 2022
@rxmarbles rxmarbles changed the title [BUG] npm 9 blows up during lerna version [BUG] npm 9 blows up during lerna version command Dec 14, 2022
@wraithgar wraithgar changed the title [BUG] npm 9 blows up during lerna version command [BUG] npm 9 does not handle workspace versioning done outside of npm version Dec 14, 2022
@wraithgar wraithgar added Priority 1 high priority issue and removed Needs Triage needs review for next steps labels Dec 14, 2022
@lukekarrys
Copy link
Contributor

This is no longer reproducible by default in npm@9.4.2 due to reverting install-links back to false (ref: #6142).

But it is still a bug and I was able to write a failing test (ref: #6150) to isolate this behavior.

The gist is that npm install --package-only-only fails when dependent workspaces have had their ranges bumped in their parent package.json but not the package-lock.json. But only when --install-links=true.

Keeping this open since we will still want to track and fix this behavior even though install-links=true is no longer the default.

azu added a commit to textlint/textlint that referenced this issue Feb 26, 2023
Enable CorePack in create-release-pr.yml

npm 9.3.1 break lerna
lerna/lerna#3455
npm/cli#5967
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 1 high priority issue Release 9.x work is associated with a specific npm 9 release
Projects
None yet
Development

No branches or pull requests

3 participants