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
i am aware that im a newb and this is probably a rather uncomplicated issue
Project ID:
![mildpanic](https://cdn.discordapp.com/emojis/804271964587819059.png)
||a5ab474b-986a-421e-8057-a321ca3f38cb||
30 Replies
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
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?
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
show me your railway service variables please (keep the values hidden)
like this?
![](https://answer-overflow-discord-attachments.s3.amazonaws.com/1121313911396900994/Screenshot_2023-06-22_014029.png)
is your .env file in your .gitignore file?
no, guessing i should do that
yes please
one moment
let me know when done, so we can move onto the next issue
sorry, was messing around a bit. ive done that, what next
send me your package.json please