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
lerna --version incorrectly updates package-lock.json generated with npm@7 #2832
Comments
I can reproduce the issue and I understand what's happening, but I have no solution. It comes from an inconsistent installation of npm. The version you have in your path differs from the one actually used by lerna in the packages. I use
But lerna doesn't use the same binary for
This is confirmed by test
And from
Using
I didn't find what |
This comment has been minimized.
This comment has been minimized.
I think the problem with |
@arantes555 You're right, the problem I have with the lockfileVersion in the package-lock.json is a bit different and most certainly unrelated with the initial bug report, I created a separate issue: #2850 |
I too am encountering this issue with Node 15 and Lerna 4. The versioning in packages section of package-lock.json is left with an old version after running publish. Subsequent attempts to publish after re-running npm install fail due to: |
@evocateur could you take a look? This blocks from using |
Just ran into this issue yesterday. Any update? Anything I can do to help? |
For those interested, we'll be working around this issue soon via this PR Note the top-level |
I am also having this error breaking my CI/CD pipeline after upgrading to Is there any fix/workaround for this? |
@k-koehler I'm using my fix from this PR #2914 with https://github.com/ds300/patch-package |
Is the file lerna/commands/version/lib/update-lockfile-version.js Lines 16 to 23 in a47fc29
This seems to only update the |
There were some problems when updating lockfiles in combination with npm8. Related lerna/lerna#2832. Changing to lerna-lite resolves this.
Expected Behavior
Package version should be correctly updated in package-lock.json version 2 with
lerna --version
command.Current Behavior
When package-lock.json in version 2 is used (generated by npm@7) then
lerna --version
command updates only the first (root) version information in the package-lock.json. The information in thepackages
section of package-lock.json is left with an old version.Steps to Reproduce (for bugs)
lerna --version
to tag a new versionlerna.json
Your Environment
lerna --version
npm --version
node --version
The text was updated successfully, but these errors were encountered: