R
Railway2y ago
cnnr

Railway CLI 4XX Errors

I just updated the Railway CLI, logged in, and linked my project. Running railway up -d throws a 413 error. So I cannot deploy my application.
14 Replies
Percy
Percy2y ago
Project ID: dfb66ac0-d8a1-48a6-b9d2-5941065b6a8a
cnnr
cnnrOP2y ago
dfb66ac0-d8a1-48a6-b9d2-5941065b6a8a
Brody
Brody2y ago
your project is too big, i think the size limit is something like 50mb just confirmed with team, it is 50mb
cnnr
cnnrOP2y ago
What does it mean that my project is too big?
Brody
Brody2y ago
some common causes of this issue would be a large .git and or node_modules folder, if thats the case add them to a .gitignore file if your project size is greater than 50mb it is too big
cnnr
cnnrOP2y ago
It seems it's my .git directory. So I need to ignore my .git directory? Is that a thing that one can do?
Brody
Brody2y ago
if thats the case add them to a .gitignore file
cnnr
cnnrOP2y ago
Yeah, but if I tell my git project to ignore the .git files, which contains the history of the project, does that not defeat the point of using git in the first place? Like, dont I just want the upload to exclude those files?
Brody
Brody2y ago
thats what a .gitignore file does excludes files and folders
cnnr
cnnrOP2y ago
Yes. I understand that. My question is: does GitHub or other git sources not need the .git contents?
Brody
Brody2y ago
adding rules to a .gitignore file does not remove the files locally, it just prevents them from being uploaded to github and railway i recommend reading this https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
cnnr
cnnrOP2y ago
Yes, I understand how gitignore works. That link does not answer my question. Specifically, my previous assumption was that the .git directory was important to upload to GitHub so that it knew about all of your git objects. It seems like you are implying that the .git directory is in fact not necessary. So I am just trying to confirm that before I go .gitignore that directory. I just want to make sure it's not some work around that would make the deploy work but break other important things. I'm specifically asking about this: https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F#:~:text=The%20Git%20directory%20is%20where,files%20in%20your%20working%20tree.
Brody
Brody2y ago
the git cli has a default ignore rule to ignore the .git folder, as you can see by your repo not having the .git file, so i dont know why you think youd want to upload it anywhere, it is purely a folder for local use only here is my issue for this, the railway cli will soon ignore the .git folder by default https://github.com/railwayapp/cli/issues/404
cnnr
cnnrOP2y ago
The .git directory isn't displayed in the repo but if you clone the repo, you get a .git directory. As someone who doesn't know the vagaries of how GitHub manages git repo internals, it didn't seem like a crazy leap to think that maybe they handled it in a special way. Idk. I'm sorry if you're having a bad day or something, but I don't really appreciate the condescension. Some form of "It's safe to gitignore the .git directory" would have been plenty sufficient. Thanks for the help.
Want results from more Discord servers?
Add your server