[Tooling] `genkit start` needs a nicer error message when running in the wrong folder
pavelgj opened this issue · comments
Right now if you run genkit start
in a wrong directory you get an error that looks like this:
$ genkit start
/Users/pavelgj/genkit/genkit-tools/common/lib/cjs/runner/runner.js:114
throw Error(`Unexpected runtime while starting app code: ${runtime}`);
^
Error: Unexpected runtime while starting app code: undefined
at Runner.startApp (/Users/pavelgj/genkit/genkit-tools/common/lib/cjs/runner/runner.js:114:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command.<anonymous> (/Users/pavelgj/genkit/genkit-tools/cli/dist/commands/start.js:55:9)
at async Command.parseAsync (/Users/pavelgj/genkit/genkit-tools/node_modules/.pnpm/commander@11.1.0/node_modules/commander/lib/command.js:936:5)
at async startCLI (/Users/pavelgj/genkit/genkit-tools/cli/dist/cli.js:66:5)
at async /Users/pavelgj/genkit/genkit-tools/cli/dist/bin/genkit.js:6:5
Node.js v21.7.3
Would be great if it showed a friendlier message.
this confused me for hours. In firebase you cannot run genkit start
from the root project folder. cd into the functions folder, run genkit init
and it all works