notiz-dev / nestjs-prisma-starter

Starter template for NestJS 😻 includes GraphQL with Prisma Client, Passport-JWT authentication, Swagger Api and Docker
MIT License
2.37k stars 336 forks source link

seeding doent work #453

Closed ghost closed 3 years ago

marcjulian commented 3 years ago

Do you have some more information? Error message? Which prisma version are you using?

For me npx prisma db seed --preview-feature works just fine.

mariuswallin commented 3 years ago

I resolved by npx prisma migrate dev

and update package.json with this

"prisma": { "seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts" }

marcjulian commented 3 years ago

Yes that is necessarcy since prisma@3.0.2