From 4d4d8fe537d8e9c91dfa9d9fd6c3110aed94ec0c Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli Date: Mon, 31 Oct 2022 14:30:00 -0400 Subject: [PATCH] always get project graph on first try --- libs/shared/workspace/src/lib/get-nx-workspace-config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/shared/workspace/src/lib/get-nx-workspace-config.ts b/libs/shared/workspace/src/lib/get-nx-workspace-config.ts index e22578a448..71e61da7b1 100644 --- a/libs/shared/workspace/src/lib/get-nx-workspace-config.ts +++ b/libs/shared/workspace/src/lib/get-nx-workspace-config.ts @@ -77,7 +77,9 @@ export async function getNxWorkspaceConfig( if (version.major < 13) { projectGraph = (nxProjectGraph as any).createProjectGraph(); } else { - if (isDaemonEnabled) { + // we always want to try to get the project graph on first load. + // So even if the daemon is disabled, we still want to try to get the project graph + if (isDaemonEnabled || projectGraph === null) { projectGraph = await nxProjectGraph.createProjectGraphAsync({ exitOnError: false, resetDaemonClient: true,