Description
I'm trying to integrate Genkit into a Next.js 14 app deployed via Firebase Hosting. I followed official Genkit examples and attempted both:
ts
Copy
Edit
import { defineConfig } from '@genkit-ai/core';
and
ts
Copy
Edit
import genkit from '@genkit-ai/core';
Both approaches fail during Firebase Hosting builds.
Using defineConfig throws:
nginx
Copy
Edit
Module '"@genkit-ai/core"' has no exported member 'defineConfig'
Using the default import genkit() throws:
vbnet
Copy
Edit
TypeError: genkit is not a function
To reproduce
npx create-next-app
Install:
bash
Copy
Edit
npm install @genkit-ai/core @genkit-ai/googleai zod
Add basic ai-instance.ts with either defineConfig() or genkit() usage.
Deploy to Firebase Hosting (or test with Cloud Build locally).
Build fails with the error above.
Expected behavior
Documentation suggests defineConfig() should be available, or that genkit() is callable. Neither work under @genkit-ai/core@1.7.0.
Environment
@genkit-ai/core: 1.7.0
@genkit-ai/googleai: latest
zod: latest
Next.js: 14.2.5
Node: v20 (Firebase build env)
Firebase Hosting + Cloud Build
Additional context
Reproduced the issue in a clean minimal test app
Seems like either the export is missing, or incompatible with ESM + Next.js build handling
Please advise on:
The correct import and usage in v1.7.0
Whether ESM-only environments like Next.js on Firebase Hosting are currently supported
Metadata
Metadata
Assignees
Labels
Type
Projects
Status