Using Prisma with fastify in create-t3-turbo

I am trying to setup a project based on create-t3-turbo so that I can share my prisma configuration between my nextjs app and fastify.

I have managed to get the project working locally, but when i build and run the fastify server i get the following error:

fastify:start: 
fastify:start: /Users/fofer/repos/catalyst/catalyst-t3-turbo/packages/db/index.ts:1
fastify:start: import { PrismaClient } from "@prisma/client";
fastify:start: ^^^^^^
fastify:start: 
fastify:start: SyntaxError: Cannot use import statement outside a module
fastify:start:     at internalCompileFunction (node:internal/vm:73:18)
Was this page helpful?