Currently, if a user runs blitz codegen, and there there is Prisma installed, Blitz also runs primsa generate. If there are any errors during the prisma generate step, they aren't displayed in the terminal even when using DEBUG=blitz:*. This way some useful information returned from Prisma is omitted.
Error:
You don't have any models defined in your schema.prisma, so nothing will be generated.
You can define a model like this:
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
}
More information in our documentation:
https://pris.ly/d/prisma-schema
Paste all relevant code snippets here:
n/a
What are detailed steps to reproduce this?
Try to run blitz codegen without any models in schema.prisma (or schema.prisma containing some errors).
What is the problem?
Currently, if a user runs
blitz codegen
, and there there is Prisma installed, Blitz also runsprimsa generate
. If there are any errors during theprisma generate
step, they aren't displayed in the terminal even when usingDEBUG=blitz:*
. This way some useful information returned from Prisma is omitted.Relevant code: https://github.com/blitz-js/blitz/blob/canary/packages/cli/src/commands/codegen.ts#L32
Paste all your error logs here:
blitz codegen
output:While
prisma generate
returns the following:Paste all relevant code snippets here:
n/a
What are detailed steps to reproduce this?
blitz codegen
without any models inschema.prisma
(orschema.prisma
containing some errors).Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
No response