diff --git a/packages/nx/src/tasks-runner/run-command.ts b/packages/nx/src/tasks-runner/run-command.ts index ef7940b3943f7..99acf236e4e2d 100644 --- a/packages/nx/src/tasks-runner/run-command.ts +++ b/packages/nx/src/tasks-runner/run-command.ts @@ -255,6 +255,12 @@ export function getRunner( } { let runner = nxArgs.runner; runner = runner || 'default'; + if (!nxJson.tasksRunnerOptions) { + output.error({ + title: `Could not find any runner configurations in nx.json`, + }); + process.exit(1); + } if (nxJson.tasksRunnerOptions[runner]) { let modulePath: string = nxJson.tasksRunnerOptions[runner].runner;