From 5d7436db7ae24f3990cbafe5b46382bf89f5c708 Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Mon, 26 Jun 2023 09:18:48 -0600 Subject: [PATCH] fix(nextjs): For serve executor keepAliveTimeout should be camelCased closes: #17765 --- packages/next/src/executors/server/server.impl.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/next/src/executors/server/server.impl.ts b/packages/next/src/executors/server/server.impl.ts index 4fd5d7d976179..8e65b6a4956ce 100644 --- a/packages/next/src/executors/server/server.impl.ts +++ b/packages/next/src/executors/server/server.impl.ts @@ -45,7 +45,11 @@ export default async function* serveExecutor( // Setting port that the custom server should use. process.env.PORT = `${options.port}`; - const args = createCliOptions({ port, keepAliveTimeout, hostname }); + const args = createCliOptions({ port, hostname }); + + if (keepAliveTimeout && !options.dev) { + args.push('--keepAliveTimeout', `${keepAliveTimeout}`); + } const nextDir = resolve(context.root, buildOptions.outputPath);