diff --git a/packages/nx/src/config/workspaces.ts b/packages/nx/src/config/workspaces.ts index c9ab38b4d5075..61a4cb381b026 100644 --- a/packages/nx/src/config/workspaces.ts +++ b/packages/nx/src/config/workspaces.ts @@ -64,7 +64,7 @@ export class Workspaces { }); if (matchingProject) return matchingProject; } - return nxJson.defaultProject; + return nxJson?.defaultProject; } readProjectsConfigurations(opts?: {