-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
@nx/esbuild:esbuild with thirdParty: false fails filtering pnpm lock-file correctly in 19.x by not removing overrides #26379
Comments
I upgraded to NX 19.2.0 and still have this issue. |
Since this is blocking me from deploying my firebase functions, unless downgrading to nx 18.3.4 or 19.0.0-beta.6, I worked out a fix using a firebase predeploy script for filtering the lock file. I have verified this is working with both pnpm v8 and v9 in nx 19.2.3. I added a script to functions predeploy in firebase.json, running this (last param is path to my firebase build):
with tools/filter-overrides.mjs containing:
I would really prefer this being fixed in nx, but if others have the same problem as me, this is a possible workaround, allowing you to also upgrade to pnpm v9. |
The fix should be easy, as the info seems informational, and should just be removed (as it was previously).... |
A related/similar problem is reported in #26884 |
Can someone provide a repo with a reproduction of the issue so that I can investigate further? |
I did provide the lock file showcasing the problem, and an older working version, in addition to my hack to fix this via a script... and if you try running pnpm install with the lock file you will get the error... I can try to make a stripped down repo later, but currently on vacation |
This error happens when we run As a temporary fix, I've noticed that adding |
This issue has been automatically marked as stale because no reproduction was provided within 7 days. |
Repro:
You will then get this error: It works if the --frozen-lockfile param is removed, but this param is used in CI environments, and when deploying firebase functions... As described earlier, I think the easy solution is to remove the overrides part of the pruned lock file.... |
Still same problem here with the 19.6.5, getting a non blocking error complaining about the lockfile then fallbacking to the root lockfile to finish the build |
Still the same for me as well, glad I found a workaround, as this is obviously not prioritised... I provided a repro 1.5 months ago, and have also described a possible solution... still assigned to @Coly010, but seems to get no attention... |
@atsjo I’m sorry if you feel this issue has not received the due attention it deserves. As you’ve mentioned, it is assigned to me and during the periods of time I dedicate to solving GitHub issues, I will be able to see it on my list. I do my best to address and reach a solution for all the issues assigned to me in the time I have to address them. We are all working hard to find the balance between delivering new features, handling maintenance tasks (such as supporting new versions of core dependencies) and fixing bugs. If you feel confident that you have a solution to this issue, you’re more than welcome to open a PR. Again, I apologise that this hasn’t been resolved as of yet. |
I totally understand the need for prioritizing the tasks affecting the most users, and this didn't seem to affect very many (and for my own part I found a workaround)... But it is now fixed with the release of nx 19.7.0, as it now generates overrides in the generated package.json, matching the ones in the lock file. Maybe the fix is in this PR #27601, fixing the related issue I mentioned above #26884, although it doesn't mention the esbuild executor, and it's committed about 3 week ago (maybe it wasn't backported to the 19.6 branch?) I am closing the issue as it now is fixed... |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
@nx/esbuild:esbuild with thirdParty: false and generatePackageJson: true filters the root lock file, but doesn't remove unrelated overrides section, causing pnpm install to fails when using the lock file.
filtered-pnpm-lock.yaml.19.2.0-rc.0.txt
Expected Behavior
pnpm install works with filtered (pruned) lock file, as for 18.3.4 (and 19.0.0-beta.6)
filtered-pnpm-lock.yaml.19.0.0-beta.6.txt
GitHub Repo
https://github.com/atsjo/nx-pnpm-repro
Steps to Reproduce
You will then get this error:
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH Cannot proceed with the frozen installation. The current "overrides" configuration doesn't match the value found in the lockfile
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
The only difference between the working and failing lock-files uploaded above is:
I would think the settings part should be kept, but the overrides part should either always be removed as a whole or filtered by included packages...
I reported a similar problem in #23256 which is fixed in #22906, but it still fails if using overrides (as I do)
The root lock file is pnpm-lock.yaml.txt and the filtered package json is filtered-package.json.txt
btw: the problems also occur when using pnpm v9, which uses a newer lock-file format...
The text was updated successfully, but these errors were encountered: