2

I have a next.js app that I am trying to deploy to Azure using GitHub Actions. - But the deployment failes with the following error.

The content server has rejected the request with: BadRequest Reason: The size of the function content was too large. The limit for this Static Web App is 104857600 bytes.

When I run npm run build on my local machine the output folder which is ".next" ends up being 27mb so I don't understand why I am getting this error.

Also the error message says "The limit for this Static Web App is 104857600 bytes"

However when I created the static app in azure, I have selected the standard hosting plan. Which according the portal allows 500MB, even the free hosting plan allows a size of 250MB.

So why does the error message say the limit for this static Web App is 104857600 bytes which converts to 104MB?

enter image description here

So what am I missing here?

Ayo Adesina
  • 2,231
  • 3
  • 37
  • 71
  • Could you please share your `GitHub code Repository` ? – Harshitha Mar 02 '23 at 03:21
  • Having exactly the same issue - did you come to any solution here? – matprzybyla Mar 18 '23 at 17:22
  • Change in next.config.js to provide standalone output helped for my case and app is now deploying properly using Azure static web apps `output: "standalone"` Please refer to https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-nextjs-hybrid#enable-standalone-feature – matprzybyla Mar 18 '23 at 17:30

0 Answers0