I am trying to play around with Firebase’s new Genkit product but whenever I run the npx genkit start
command, I get one of two errors:
throw Error(`Unexpected runtime while starting app code: ${runtime}`);
npm ERR! Missing script: "build"
I am trying to play around with Firebase’s new Genkit product but whenever I run the npx genkit start
command, I get one of two errors:
throw Error(`Unexpected runtime while starting app code: ${runtime}`);
npm ERR! Missing script: "build"
2
Answers
I didn't read the docs and was using an older version of node. Genkit requires Node.js 20 or later.
To fix, this I just updated Node:
Then I reran the install command:
And everything worked as expected. Wish the error message was not as cryptic!
First check if genkit is installed globally
If genkit is in the list, run below cmd to init