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
Project ID:
dfb66ac0-d8a1-48a6-b9d2-5941065b6a8a
dfb66ac0-d8a1-48a6-b9d2-5941065b6a8a
your project is too big, i think the size limit is something like 50mb
just confirmed with team, it is 50mb
What does it mean that my project is too big?
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
It seems it's my .git directory. So I need to ignore my .git directory? Is that a thing that one can do?
if thats the case add them to a .gitignore file
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?
thats what a .gitignore file does
excludes files and folders
Yes. I understand that.
My question is: does GitHub or other git sources not need the
.git
contents?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
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.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
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.