-
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 release version incorrectly resolves some dependency versions #28695
Comments
+1 encountered same issue on the new packages |
Tried to use Maybe I'm missing something... @JamesHenry do you by any chance have any link/tutorial about how to correctly set up Nx Release with:
It used to work correctly with npm and versioning inside source control |
@xalechez Did you try running the publish with |
Also found a related problem where Example: Result: Package A dependencies only has Package B updated while Package C version remains the same For reference, I've tested with NX version 19 and it works as expected, so, it seems to be something introduced in version 20. |
With Nx 20.1.4 it accidentally got better. Now instead of ~15 broken links in my monorepo I have only one. Does anyone know what change could cause this improvement? |
So the problem is that the one broken link doesn't appear in When I run a project graph, both via CLI and programmatically, it identifies this dependency correctly. Even more, when I put a debugger on This is a very weird behaviour which I'll try to debug further (which is quite complex because of a lot of nested loops), but it looks like a race condition which for some reason makes this link to be filtered out of the version data after something else changes in the background (I assume Nx writes version data in parallel as I see I would be very grateful for any more advise on this issue from the team as it's currently a large blocker for us adopting Nx |
Greetings. Apologies if this is not the most relevant place to put this info, so I will keep it ultra short. If you are getting For some weird reason, this is not an issue with nx 19, but after I upgraded to 20 I started getting it. Anyway, have a nice day. |
Current Behavior
Info about the workspace:
When running
nx release version --dry-run --specifier patch
package.json
for Package A is updated correctlypackage.json
for Package D is updated incorrectlyMy main assumption is that
package.json
of Package D is updated beforePackage A
, resulting in the version of Package A to be resolved to 0.0.0. There're no cycles in the graph, so I think that the execution order of versioning is wrong.Expected Behavior
I'd expect
package-a
version insidepackage-d
package.json file to be3.0.2
. Either Nx should write versions first and then handle dependencies, or execute versioning in correct order aligning with the project graphGitHub Repo
No response
Steps to Reproduce
nx release version --dry-run --specifier patch
Nx Report
NX Report complete - copy this into the issue template
Node : 18.20.4
OS : darwin-arm64
Native Target : aarch64-macos
pnpm : 9.12.0
nx (global) : 19.6.4
nx : 20.0.6
@nx/js : 20.0.6
@nx/jest : 20.0.6
@nx/eslint : 20.0.6
@nx/eslint-plugin : 20.0.6
typescript : 5.6.3
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
This error repeats on 19.8.3 which could mean it's not related to #28380
The text was updated successfully, but these errors were encountered: