PrismaP
Prisma2mo ago
20 replies
Trenchguns

Prisma 7 migration failing

This is most likely the first migration I've tried since v7 released.
I have a setup with two datasources
/Prisma/source1/schema etc
/Prisma/source2/schema etc

Trying to run a migration I get back an error;
Error: Error: Could not parse schema engine response: SyntaxError: Unexpected token 'D',
Did you me... is not valid JSON
at tCe (D:\repos\keep\node_modules\prisma\build\index.js:290:1285)

I've enabled RUST_LOG=debug and DEBUG=* but there doesn't seem to be any further (useful) information provided in the output. I am also in a bit of a unique scenario where I needed to manually download the schema engine and place it manually and point to it with an environment variable, I downloaded the latest version to see if that would help, but no luck

Here is the prisma.config.ts at the root level that I'm feeding to the config parameter of the migrate command. I'm only migrating source1.

Don't mind syntax issues, used ocr to transfer it
import {defineConfig, env} from 'prisma/config';

export default defineConfig({
schema './prisma/source1/schema.prisma',
datasource:{
  url: env('DATABASEURL'),
  shadowDatabaseUrl: env('DATABASEURL')
}
})



Edit: after tweaking the index.js to output the string being json parsed it comes in as Did you mean --datamodels
Was this page helpful?