notiz-dev / nestjs-prisma-starter

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

Getting Started: Error querying the database: db error: FATAL: role "prisma" does not exist #447

Closed joshsny closed 3 years ago

joshsny commented 3 years ago

I am completely new to both NestJS and Prisma so forgive me if I am making a silly mistake. 🤦

I've run through the instructions a couple of times and can't seem to get past Step 3.

To reproduce:

git clone https://github.com/fivethree-team/nestjs-prisma-starter
cd nestjs-prisma-starter
npm install
cp example.env .env 
npm run docker:db
npm run migrate:dev

Which results in the following error: Error querying the database: db error: FATAL: role "prisma" does not exist

marcjulian commented 3 years ago

Hey @joshsny can you add the whole logs when you run npm run migrate:dev?

It might be that the database is not correctly created by docker.

By the which node version are you using? Prisma supports following node versions

DiMatteoL commented 1 year ago

You might want to clean your nest-db docker volume