9 months ago
Hi,
After doing
"npx prisma migrate dev" and
"npx prisma generate"
I am unable to build my nextJS app without error with the pre-rendering and I have logs saying:
LOG: checkpoint starting: time
LOG: checkpoint complete: wrote 14 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.305 s, sync=0.004 s, total=1.313 s; sync files=14, longest=0.002 s, average=0.001 s; distance=65 kB, estimate=7198 kB; lsn=0/5E60D0B0, redo lsn=0/5E60D078
LOG: could not receive data from client: Connection reset by peer
LOG: could not receive data from client: Connection reset by peer
LOG: could not receive data from client: Connection reset by peer
Is it my issue or railway ?
Thank you.
3 Replies
9 months ago
Hi,
Thank you for your response. I am connecting to my database from locally on my development machine.
Actually, I tried to push my code on vercel and it's working there.
Only my pre-rendering on local when doing npm run build have issues. While my database en code are up to date en sync.
Even tho when doing npx prisma migrate dev or npx prisma db push. There are error logs as mentioned previously
9 months ago
I am not sure to fully understand what was the problem but it has been solved.
I had multiple .env file in my root, .env, .env.production.local, .env.testing.local, with multiple database for each environnement.
The project in local has always took, the .env as the default.
However since yesterday, all the command, and everything was going to this .env.
But my npm run build tho, was taking my testing or production .env file instead.
Therefor I had the conflict, where npx prisma migrate dev was saying that my DB was up to date
but doing npm run build was saying that my DB was missing some column in my tables.
Very confusing, but I kept only one .env file and solve the issue.
Thank you for the help.
Status changed to Solved brody • 10 months ago