I am working on nextjs/reactjs project. I'd like to push it to GitHub and then deploy it on Vercel but when I run the command " git push -f origin master", I get the following error:
remote: warning: File .next/cache/webpack/client-development/1.pack is 51.79 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File .next/cache/webpack/client-development/10.pack is 85.61 MB; this is larger
than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File .next/cache/webpack/client-development/4.pack is 68.47 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File build/cache/webpack/client-development/6.pack is 58.71 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File .next/cache/webpack/client-development/33.pack is 58.47 MB; this is larger
than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File .next/cache/webpack/client-development/18.pack is 68.53 MB; this is larger
than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File .next/cache/webpack/client-production/11.pack is 57.80 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File .next/cache/webpack/client-development/36.pack is 70.37 MB; this is larger
than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File .next/cache/webpack/client-development/16.pack is 51.49 MB; this is larger
than GitHub's recommended maximum file size of 50.00 MB
remote: error: Trace: 03b58dddd7287425c8208146b851869685188308516370c77e3e662c5153ba87
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File build/cache/webpack/client-development/10.pack is 139.61 MB; this exceeds GitHub's file size limit of 100.00 MB
I've done some research, but I didn't find any solutions. Is there any solutions to Ignore Webpack in a way to not impact the website deployment ?
CodePudding user response:
You should put the .next
and build
folders in your .gitignore
. They are not required to be version controlled and as the error states, too big to store on GitHub.
CodePudding user response:
You have to add .gitignore
file to your root directory.