I have an error when trying to push my React app onto Github. First I created the repository in Github. Then, I added the remote repository using git remote add origin <repo name>. Then I added and commit the files. Lastly I tried git push -u origin main. I got the following error:
remote: error: File node_modules/.cache/default-development/0.pack is 153.50 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File node_modules/.cache/default-development/4.pack is 131.01 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File node_modules/.cache/default-development/2.pack is 131.43 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File node_modules/.cache/default-production/0.pack is 131.55 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File node_modules/.cache/default-development/9.pack is 131.12 MB; this exceeds GitHub's file size limit of 100.00 MB
I do not understand how it would exceed the limit as I have created two other React apps with more code in the past and uploaded them the same way to Github. The only difference I can think of is that this project uses Tailwind Css and Firebase. How can I reduce the size of node_modules/.cache/default-development/9.pack or even find what the file is?
node_modulesinto Git. You only want to commit the package lockfile. stackoverflow.com/q/18128863/2954547. Unfortunately these large files are now embedded in Git history and will need to be removed with a tool like BFG Repo Cleaner. stackoverflow.com/questions/tagged/bfg-repo-cleaner.