I had the same issue. I eventually had to edit a portion of my
package.json file from:
"build": "next build", to
"build": "next build && next export",
Deploying Nextjs app to Azure Static Web App fails on build
I've been following the guidelines to deploy NextJS application on azure as Static Web App, but unfortunately getting build failed on the build with "The app build failed to produce artifact folder: 'out'. Please ensure this property is configured correctly in your workflow file." error. We've tried the solutions on blogs and already asked questions, but we are not concluded for the solutions. The NextJS Apps does not have an .html page, some said that is the reason but I should not be needing to change the NextJS to SPA app.
Thanks for replying, yes actually I followed the guideline about the paths and tried the possibilities according the folder structure.
I have no Front-End expertise, but as far as I made the some search the application is not able to do the exporting due to a library named 'i18n' which is preventing the export command thus output_location can't get the 'executables'.
I tried for different solutions and workarounds but no result. After that I tried to deploy the app as an App Service but that went even worse since I wasn't able to find suitable guide on how to deploy nextjs app as an app service.
Sorry for not being able to share the repo since its a private one. But I would love to hear some ideas. @SnehaAgrawal.
Sign in to comment