Database errors happening randomly after update
I updated some parts of my code, and now, out of nowhere prisma just throws the biggest error I've ever seen. I asked my friends about it and they say that Prisma isn't at fault. It says that there's a library missing but everything works well locally. Can someone shine some light on this?
54 Replies
Project ID:
6e3a9590-ec0b-4bb2-9fa9-e4cf6a9ccea7
6e3a9590-ec0b-4bb2-9fa9-e4cf6a9ccea7
Here are the logs
you are the second person to have this issue
First time I've seen something like this, and the weird part is that everything is running well locally
It's really odd, it just happened out of nowhere
I think I saw a message saying that it can't download the engines for debian
my recommendation to you is going to be the same as it was to them, move to a dockerfile
Can I see the thread and file
that way you won't be at the whims at nixpacks updates
https://discord.com/channels/713503345364697088/1242787140983586826
Wait this issue is from a nixpacks update?
likely
Just like that guy I wonder what to put in my dockerfile
Actually
I think I can reuse one from my old bot (azalea) since their structure is pretty similar
whatever you need to successfully build and run your app
it's pretty simple, just tsc and a start script
then the dockerfile is going to be simple
Yeah no, It didn't run
At all
be more specific please?
It's not an issue with railway, it's just the way my 'managers' are divided now
i rlly avoid using docker so im pretty unfamiliar with it
is there a way to use the older version of nixpacks that doesn't have this issue?
yes, specify the version in a railway.json file, but a Dockerfile is gonna be the way to go tbh
i'd rather avoid dockerfiles as long as possible... anyway, how do I do this?
I want to use the previous version to this release, which would be 1.23.0 if im not wrong
is this correct?
it looks correct
i'll publish to the repo and try then
One thing I don't understand... how come that the new version was released 2 days ago but I only got the error now
I don't think it's working, it has published the image like 3 times
or is that normal
yeah no, it didn't work
error still persists
looks like my previous builds used nixpacks version 1.22, gonna try that
sounds good
it's still persisting... how??
what is, please be more specific, I can't see anything about your deployment
the same error, even with nixpacks 1.22.0
guess i'll just switch to my vps for the time being
so then it isn't an issue with nixpacks, do the classic delete node_modules and lock file
alright, lets see if it works now
still the same error...
yeah Im getting tired of this
gonna just switch to my vps
Wait hold on, now it's telling me that openssl 3.0.x isn't installed
I'm really not sure how a VPS is a suitable alternative to Railway
Because rn it's the only place where I can host my stuff without getting any errors, it's not an alternative it's a replacement till i figure out this dockerfile
gotcha, but you could write a Dockerfile much faster than you could to deploy something to a VPS
I already had everything setup from before I started using railway, I just had to git pull so everything got updated
Anyway, this is the dockerfile i came up with
does the error disappear with that Dockerfile?
I'll test it in a bit, hopefully it does. If this doesn't either then idk what will
if it doesn't fix it, then it's definitely a code issue
My laptop died on me while I was making the file so I didn't get to try it
that's not ideal
The only thing I updated was my Logger class, and that has nothing to do with prisma
Like I said, this error was extremely random
I literally just changed the ansi color of a function, got an alert that my deployment failed, and saw that error
the development word is crazy like that sometimes
If it were something like that then it wouldn't run on a vps either, yet it did, and all I had to do was just
git pull
to update, and fill in the env file. Plus the other person who got this didn't experience it after a database update in his code... so it doesn't make much sense for it to be a code issueokay fair, if it doesn't fix it, then it's definitely a config issue
like a mismatched bun version or something
I seem to have fixed it with a simple image, although idk how much of a solution this is
I set the custom start command to
bun run start
, which is sleep 3 && bun x prisma db push && tsc && bun run deploy && bun run dist/index.js
Idk how much of an actual solution this is but it seems to be working
That's the dockerfile for referencewhere is the start command being set?
After the image is published, basically to sdout if I'm not wrong
Idk I still suck at docker
haha that doesnt answer the question in the slightest
Yeah sorry, I honestly have no idea what I did there, but it works and Ig that's a win
For now
good with me
It's just the custom railway start command
I set it to
bun run start
That's itbut if i where you id set the start command in a CMD line in the dockerfile instead of the service settings
I'll try that, sure
Solution
Good enough?
Oh
It worked
Nice
now if you are feeling up for it, read this and implement the suggested changes
https://bun.sh/docs/bundler/executables#deploying-to-production
Maybe another time, I'm js happy it works for now