Error when deploying discord bot
I've keep getting this error, I've been trying to fix this for months. Everything works fine on replit after I install and import the canvas node mod, but when I deploy to railway I get this error
Solution:Jump to solution
try adding this as a
Dockerfile
to your project
```dockerfile
FROM node:20.10.0-alpine
ENV NODE_ENV production...69 Replies
Project ID:
138d844f-4f7b-4147-a4db-91e3c810b681
infamous 'glibc not found'
138d844f-4f7b-4147-a4db-91e3c810b681
Any idea how to fix it?
Mind sending me your build logs using this tool?
https://bookmarklets.up.railway.app/log-downloader/
I'm on my phone rn, it doesn't seem to work
yea unsure if it works on mobile
no worries, just wanted to see your build logs to make sure nothing funny is going on, was a shot in the dark
I have no idea
Maybe someone who has an idea will hop in this thread though
What is a build log
Ok
Is it my deployments
one more reason to migrate off nodejs
alr, do u have any deps that may need binary files? like esbuild, squash or sharp?
try adding a nixpacks.toml to your project with this in it
Uhh I don't think so
Alr thanks, I'll try it
It seemed to give the same error
build logs please, fragly sent the bookmarklet you'd need to use to get them
How do I use it on my phone?
I'm on my phone rn, but I can't figure out how to get it to work
And what's a bookmarklet
you cant use it on a phone as far as i know, we have no problems waiting until youre able to get on a computer
theres a link on the page to a site that explains it
Oh alr
Ok here
build logs please
Oh my b
seems like you havent done this yet, please do
I did,
is the file in your repo?
I pushed the changes , it gave the same error
Yeah
latest build logs please
These are latest
share your repo please
GitHub
GitHub - IterationSeven/Mercury
Contribute to IterationSeven/Mercury development by creating an account on GitHub.
try this nixpacks.toml file instead
Ok
Same error I think
build logs please
Ok
Btw, In order to make canvas work on replit I had to add this
To my replit.nix file
It fixed it on replit
and we supposedly did that here too
Is this a common issue
no, but try moving to a dockerfile based build
How do I do that? Is it just something I need to install on replit? I'm not very experienced with backend programming if you coudnt tell, I mostly just build websites so all of this is new to me
Solution
try adding this as a
Dockerfile
to your project
Ok, and I just run it like normal?
locally yes
Ok, so it says there's a error in the build logs
But it works fine on replit
build logs please
i have updated this, please update your Dockerfile too
I'm using node js btw not python
yeah but node-gyp needs python
Oh alr
might also need other things, but we will start with that
Yeah, same error
thats not the same error
Oh
It looked the same
it do look the same
updated
Ok, another error
what node version do you use locally?
I'm not sure, let me check
V20.10.0
haha why didnt you tell me you dont use node 18 locally
updated
Lol My b I didn't even know my version 😂
error
nah it still needs python haha
updated
run it back
okay that was a syntax error, my bad
we will get there in the end lol
It's all g dw
Yes, it worked!!!
Thanks so much 🙂
I've been stuck with that issue for like 2 months ðŸ˜
woohoo