4

Trying to deploy nexjs app to Azure via github but keep getting error message as below. I have tried everything mentioned in the previous conversation but no success. Please help me to fix it.

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.

enter image description here

I tried different ways to deploy the app but still not working. Please help

Harshitha
  • 3,784
  • 2
  • 4
  • 9
jits
  • 41
  • 4
  • Check the function which you are calling within the `api` folder.[Folder Structure](https://i.stack.imgur.com/a3tme.png) – Harshitha Jan 13 '23 at 10:19
  • Check the related github issue : https://github.com/Azure/static-web-apps/issues/1034 There is a workaround here that worked for me – Mose May 10 '23 at 08:14

1 Answers1

0

I have followed the MSDoc to deploy Next JS app to Azure Static Web App.

Steps for Static Generated NextJS

  • Create a Azure Static Web App in Azure Portal

enter image description here

enter image description here

  • If your application does not contain any API, make sure you are leaving the Api location empty.

Provide the value only if you have any API.

As I don't have any API, so leaving the value as empty.

Check the build status in GitHub Repository Actions.

enter image description here

Output:

enter image description here

Also check the similar issue in GitHub

Build details for Hybrid Next JS

enter image description here

Both worked for me without any issues.

enter image description here

Output for API

enter image description here

Harshitha
  • 3,784
  • 2
  • 4
  • 9
  • I followed that exact procedure, step by step, and got the exact same error. I even tried to comment api_location in the workflow without success. – Mose May 10 '23 at 07:51