diff --git a/e2e/nx/src/watch.test.ts b/e2e/nx/src/watch.test.ts index 5b863a6c5521c..bf97e6ce6ca5f 100644 --- a/e2e/nx/src/watch.test.ts +++ b/e2e/nx/src/watch.test.ts @@ -174,6 +174,7 @@ async function runWatch(command: string) { CI: 'true', ...getStrippedEnvironmentVariables(), FORCE_COLOR: 'false', + NX_DAEMON: 'true', }, shell: true, stdio: 'pipe', diff --git a/packages/nx/src/command-line/watch/watch.ts b/packages/nx/src/command-line/watch/watch.ts index 73c6d7440f235..5b673b48df9d0 100644 --- a/packages/nx/src/command-line/watch/watch.ts +++ b/packages/nx/src/command-line/watch/watch.ts @@ -159,7 +159,7 @@ export async function watch(args: WatchArguments) { process.env.NX_VERBOSE_LOGGING = 'true'; } - if (daemonClient.enabled()) { + if (!daemonClient.enabled()) { output.error({ title: 'Daemon is not running. The watch command is not supported without the Nx Daemon.',