Ennabah
08/09/2022, 1:14 PM$ docker exec -it main /bin/sh
# npx prisma migrate dev --name init
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "postgres", schema "public" at "postgres:5432"
Error: P1001
Can't reach database server at `postgres`:`5432`
Please make sure your database server is running at `postgres`:`5432`.
I have made this project as a guide to reproduce the error I’m receiving, the README.md file contains the steps. I’ve also recorded and attached a (terrible 😬) video recording to show in case you don’t wanna run the project
I’m running on MBP M1 Max if that would help, but I hope I’m doing something wrong and it’s not environment related thingEnnabah
08/09/2022, 1:16 PMpostgres
docker containerEnnabah
08/09/2022, 1:49 PMnode:lts-buster-slim
to node:18
and it worked. My best guess the reason it was failing is because lts-buster-slim
doesn’t have all the packages required by prisma
.
It would be great if the migration tool team added more logs to help us identify the reason.
I’m not sure if I’ll continue sticking to node:18
on Docker, but I’ll keep this post here as a reference for future reference.Nurul
08/10/2022, 1:30 PMEnnabah
08/10/2022, 2:35 PM