From a250170c8e06e40d962dcc16f79148d1b68a0d89 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Tue, 19 Nov 2024 08:31:39 -0500 Subject: [PATCH 1/2] fix(cli): on windows use shell option to spawn runtime process https://stackoverflow.com/questions/37459717/error-spawn-enoent-on-windows This is a quick fix that seems to work in my testing. As a follow up we should explore: https://www.npmjs.com/package/cross-spawn Filed https://github.com/firebase/genkit/issues/1332 to track --- genkit-tools/cli/src/commands/start.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/genkit-tools/cli/src/commands/start.ts b/genkit-tools/cli/src/commands/start.ts index 375a537a8..52a37feac 100644 --- a/genkit-tools/cli/src/commands/start.ts +++ b/genkit-tools/cli/src/commands/start.ts @@ -40,6 +40,7 @@ export const start = new Command('start') runtimePromise = new Promise((urlResolver, reject) => { const appProcess = spawn(start.args[0], start.args.slice(1), { env: { ...process.env, GENKIT_ENV: 'dev' }, + shell: process.platform == 'win32', }); const originalStdIn = process.stdin; From 35afa5e31932a3052ee8577b62ebdc7a96066d11 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Tue, 19 Nov 2024 08:43:33 -0500 Subject: [PATCH 2/2] Update genkit-tools/cli/src/commands/start.ts --- genkit-tools/cli/src/commands/start.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genkit-tools/cli/src/commands/start.ts b/genkit-tools/cli/src/commands/start.ts index 52a37feac..b00e19b64 100644 --- a/genkit-tools/cli/src/commands/start.ts +++ b/genkit-tools/cli/src/commands/start.ts @@ -40,7 +40,7 @@ export const start = new Command('start') runtimePromise = new Promise((urlResolver, reject) => { const appProcess = spawn(start.args[0], start.args.slice(1), { env: { ...process.env, GENKIT_ENV: 'dev' }, - shell: process.platform == 'win32', + shell: process.platform === 'win32', }); const originalStdIn = process.stdin;