Can someone help me deploy my discord bot from Railway?

I have a simple bot I wrote in js that im having trouble deploying via railway. any help would be appreciated mildpanic i am aware that im a newb and this is probably a rather uncomplicated issue Project ID: ||a5ab474b-986a-421e-8057-a321ca3f38cb||
30 Replies
Percy
Percyβ€’15mo ago
Project ID: a5ab474b-986a-421e-8057-a321ca3f38cb
*π”°π”²π” π” π”²π”Ÿπ”²π”°
Error I got: ============== ο»ΏUsing Nixpacks ο»Ώ============== ο»Ώ ο»Ώcontext: 3acce8e35f744a1625653fb4066072a8 ο»ΏNixpacks build failed ο»Ώ ο»Ώ ο»ΏNixpacks was unable to generate a build plan for this app. ο»ΏPlease check the documentation for supported languages: https://nixpacks.com ο»Ώ ο»ΏThe contents of the app directory are: ο»Ώ ο»Ώ.env ο»Ώindex.js ο»Ώpackage-lock.json
Getting Started | Nixpacks
App source + Nix packages + Docker = Image
Brody
Brodyβ€’15mo ago
i see a few things wrong, lets start with the most important one: you are using a .env file in a github repo, this is a huge security concern, you should not be hardcoding any credentials, please use service variables in railway.
*π”°π”²π” π” π”²π”Ÿπ”²π”°
i regened the token but left it there for viewing purposes so, remove .env and leave it as a variable?
Brody
Brodyβ€’15mo ago
thats good, but please still use service variables https://docs.railway.app/develop/variables#defining-variables
*π”°π”²π” π” π”²π”Ÿπ”²π”°
done, so what now? after removing the file and fixing the variable i still get that same error
Brody
Brodyβ€’15mo ago
show me your railway service variables please (keep the values hidden)
Brody
Brodyβ€’15mo ago
is your .env file in your .gitignore file?
*π”°π”²π” π” π”²π”Ÿπ”²π”°
no, guessing i should do that
Brody
Brodyβ€’15mo ago
yes please
Brody
Brodyβ€’15mo ago
let me know when done, so we can move onto the next issue
*π”°π”²π” π” π”²π”Ÿπ”²π”°
sorry, was messing around a bit. ive done that, what next
Brody
Brodyβ€’15mo ago
send me your package.json please
Want results from more Discord servers?
Add your server