You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running nx sync, Nx automatically adds TypeScript project references between two applications that are structurally similar (95% shared dependencies) but serve different purposes. The sync
generator keeps adding cross-references like:
Even after manually removing the unwanted reference, running nx sync again re-adds it.
Expected Behavior
nx sync should only add TypeScript project references when there are actual import dependencies between projects, not based on structural similarity alone.
Steps to Reproduce
Create two applications with nearly identical structure and dependencies
Ensure both apps share ~95% of their dependencies but have different purposes
Remove any TypeScript project references between the apps
Run nx sync
Observe that cross-references are automatically added back
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Current Behavior
When running nx sync, Nx automatically adds TypeScript project references between two applications that are structurally similar (95% shared dependencies) but serve different purposes. The sync
generator keeps adding cross-references like:
// apps/app-a/tsconfig.json
"references": [
{
"path": "../app-b" // ← This gets added automatically
},
{
"path": "../../libs/shared-lib"
}
]
Even after manually removing the unwanted reference, running nx sync again re-adds it.
Expected Behavior
nx sync should only add TypeScript project references when there are actual import dependencies between projects, not based on structural similarity alone.
Steps to Reproduce
Environment
Minimal Repository
workspace/
├── apps/
│ ├── app-a/ (content-focused app)
│ └── app-b/ (form-builder-focused app)
└── libs/
├── shared-ui/
└── form-builder/
Additional Context
Proposed Solutions
Workarounds Attempted
Did you already encounter that ?
Beta Was this translation helpful? Give feedback.
All reactions