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.
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',
})
}
}
}
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',
})
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!
2 Replies
Prisma AI Help
Prisma AI Help2mo ago
You decided to hold for human wisdom. We'll chime in soon! Meanwhile, #ask-ai is there if you need a quick second opinion.
Nurul
Nurul4w ago
GitHub
Getting "Failed to parse syntax of config file" error following CON...
Question 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-rep...

Did you find this page helpful?