Description
I'm getting this error on GitHub actions when trying to deploy a simple nextjs application to Azure Static Web Apps:
---End of Oryx build logs---
Function Runtime Information. OS: linux, Functions Runtime: ~4, node version: 16
Finished building function app with Oryx
Zipping Api Artifacts
Done Zipping Api Artifacts
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.
I followed this guide:
https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-nextjs-hybrid
I've moved all devdependencies to the proper section in my package.json:
"dependencies": {
"next": "13.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.7.1"
},
"devDependencies": {
"@types/node": "18.11.18",
"@types/react": "18.0.26",
"autoprefixer": "^10.4.13",
"eslint": "8.31.0",
"eslint-config-next": "13.1.1",
"postcss": "^8.4.21",
"sharp": "^0.31.3",
"tailwindcss": "^3.2.4",
"typescript": "4.9.4"
}
If I remove a couple images I can get it to build, but as the complexity of my app increases it hits the error. It works fine deploying to Vercel, but I would prefer to run it on Azure and use the supported hybrid (not just static site) features. Can you provide a solution or workaround to this issue that doesn't involve switching to static? Or fix this bug?
I know it isn't exactly related but I also am using the paid version of Azure static web apps so I can have larger projects, but that doesn't impact this bug as it seems the build process has a lower limit. Thank you!