PrismaP
Prisma3mo ago
5 replies
Tim

Failed to parse syntax of config file

Hi everyone,

I get this error when executing pnpm prisma generate:
Failed to parse syntax of config file at "<PATH>/prisma.config.ts"


My prisma.config.ts file looks as follows:
import { PrismaPg } from '@prisma/adapter-pg'
import 'dotenv/config'
import type { PrismaConfig } from 'prisma'
import { env } from 'prisma/config'

export default {
  schema: 'prisma/schema.prisma',
  migrations: {
    path: 'prisma/migrations',
    seed: 'tsx prisma/seed.ts',
  },
  engine: 'js',
  async adapter() {
    return new PrismaPg({ connectionString: env('DATABASE_URL') })
  },
} satisfies PrismaConfig


This seems to be related to switching the engine from 'classic to 'js' (I'm running into issues with Docker compose so I wanted to give the new engine option a try). Maybe the adapter is not correctly set up? I'm having a hard time figuring out how to configure this with the PostgreSQL-Adapter correctly... the error message doesn't really say anything. In the TypeScript definitions, every property is optional.
Was this page helpful?