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
Migration failure causing nx dependency graph to break #12583
Comments
There is a migration that should happen when moving to or past I generated a new 14.1.4 workspace with Can you share your repo before migrating? Or at least an
|
@FrozenPandaz there was a discussion about this in Slack My understanding is that this only would affect repos where the nx.json extends from the edit: this is the full nx.json before migration:
|
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
In two separate Nx repositories, when I've upgraded to newer versions (most recently from 14.1.4 to 14.8.3) there ends up being an issue with the migrations which causes the whole Nx dependency graph to break for unclear reasons (eg. when I run
nx dep-graph
it just shows a large flat list of all my packages rather than a tree). Another symptom is that thepackage.json
output of the built package / application (when using the generatePackageJson option) ends up with a blank dependencies list.The fix for the problem appears to be this
#10785 (comment)
While I managed to track this down both times after several hours of troubleshooting, it seems like Nx should be fixing this scenario with a migration that corrects the problem. I don't fully understand what migration caused the original issue since it isn't mentioned in that comment.
Expected Behavior
nx migrate
should result in a working repository after migrations are finished.Whatever migration issue caused this issue to begin with should be retroactively fixed by a new migration.
Steps to Reproduce
It's not exactly clear what versions or upgrade paths have caused this issue, all I can say is that I've now run into it twice on two separate repositories which were updated at different times through different versions of Nx. It seems like others will run into this to, and the symptom of it is basically that Nx becomes silently nonfunctional with no error messages.
Environment
Edit: After discussions on Slack, the problem appears to be specifically with the migration to 14.2 that was meant to enable analyzeSourceFiles for nx repos that extend the
npm
preset. The default value for that was changed tofalse
in 14.2, so a migration was supposed to add thetrue
setting back in to maintain backwards compatibility. However, in my case this migration did not appear to work.The text was updated successfully, but these errors were encountered: