Genkit + Sveltekit = dotPrompt NOT_FOUND folder error

There is a “prompts” folder in the root directory of the project which works fine on local development, but when I try deploying on Vercel, it actually builds but still crashes the application on every request:

Unhandled Rejection: GenkitError: dotprompt: NOT_FOUND: Could not find 'test.prompt' in the prompts folder.
    at /var/task/node_modules/@genkit-ai/dotprompt/lib/registry.js:80:13
    at Generator.next (<anonymous>)
    at /var/task/node_modules/@genkit-ai/dotprompt/lib/registry.js:36:61
    at new Promise (<anonymous>)
    at __async (/var/task/node_modules/@genkit-ai/dotprompt/lib/registry.js:20:10)
    at maybeLoadPrompt (/var/task/node_modules/@genkit-ai/dotprompt/lib/registry.js:73:10)
    at /var/task/node_modules/@genkit-ai/dotprompt/lib/registry.js:68:14
    at Generator.next (<anonymous>)
    at fulfilled (/var/task/node_modules/@genkit-ai/dotprompt/lib/registry.js:23:24) {
  status: 'NOT_FOUND',
  detail: undefined
}

The prompts folder is not inside “src” because they only allow for relative imports based on the “root”.
How should I import the folder in Vercel so its acessible from the server-side?

Hey, @elizeuangelo! Welcome to the Vercel Community :smile:

Sharing our community post on debugging build errors in case it’s helpful!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.