Skip to content

Commit e586896

Browse files
authored
fix(core): prioritize nx installation path in getNxRequirePaths (#34158)
## Current Behavior `getNxRequirePaths` returns paths in the order `[root, getNxInstallationPath(root)]`, which means the workspace root is checked first when resolving modules. ## Expected Behavior The nx installation path (`.nx/installation`) should be prioritized and checked first before falling back to the workspace root. This ensures that modules from the nx installation directory take precedence. ## Related Issue(s) N/A
1 parent d233518 commit e586896

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/nx/src/utils/installation-directory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export function getNxInstallationPath(root: string = workspaceRoot) {
66
}
77

88
export function getNxRequirePaths(root: string = workspaceRoot) {
9-
return [root, getNxInstallationPath(root)];
9+
return [getNxInstallationPath(root), root];
1010
}

0 commit comments

Comments
 (0)