PrismaP
Prisma3mo ago
2 replies
Trikooplays

Getting "Failed to parse syntax of config file" error following CONTRIBUTING.md setup

Hi everyone!

I'm working on my first contribution to Prisma and following the setup instructions in CONTRIBUTING.md. I've successfully set up my sandbox environment (sandbox/my-repro), but I'm running into a validation error with the config file.

Issue:
The template
prisma.config.ts
that came with the sandbox folder throws a parsing error when running:

pnpm dbpush
> basic-sqlite@ dbpush /Path-to-repo/prisma/sandbox/my-repro
> prisma db push --skip-generate

Failed to parse syntax of config file at "/Path-to-repo/prisma/sandbox/my-repro/prisma.config.ts"
 ELIFECYCLE  Command failed with exit code 1.


The problematic config (from the template):

export default {
  earlyAccess: true,
  schema: './prisma/schema.prisma',
  migrate: {
    adapter: async () => {
      return Promise.resolve({
        adapterName: '@prisma/adapter-mock-sqlite',
      })
    }
  }
}


What works:
When I replace it with a minimal config, it works fine:

import { defineConfig } from '@prisma/config'

export default defineConfig({
  schema: './prisma/schema.prisma',
})


My Analysis:
Looking at the validation code in packages/config/src/PrismaConfig.ts, and then following the root cause, I think the issue is:

1. earlyAccess is not a recognized property (should be experimental?)
2.
migrate
should be migrations?
3. The
adapter
config structure doesn't match the expected schema

Questions:

- Is the sandbox template config outdated?
- What's the correct way to set up a basic sandbox for development following CONTRIBUTING.md?
- Should I submit a PR to update the sandbox templates to match the current validation schema?

Any guidance would be appreciated!
Was this page helpful?