opengb
opengb copied to clipboard
Cannot create module without defined DB model, Prisma throws error
@kacper said:
Can't create a module without a defined db model. Prisma throws an error.
Steps to reproduce:
- Init new OpenGB
- Adds some modules
- Run
opengb create script my_module
- Run
opengb create script my_module test
- Run
opengb dev
You should see the following error:
error: Failed to run: prisma generate
stdout: Prisma schema loaded from schema.prisma
Prisma schema loaded from schema.prisma
stderr: 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
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
Failed. Found 1 error.