Azure Static Web Apps deploy from Github fails

Hussein Ismail 1 Reputation point
2022-10-17T18:24:12.69+00:00

Hello,
Our deployment from Github to SWA started failing after Oct 2. We have no clue what is causing it to fail. The failure error is shown in the attached image.

251176-image.png

The frontend code does not include api folder shown from below.

251109-image.png

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 28,136 Reputation points Microsoft Employee Moderator
    2022-10-28T13:40:41.28+00:00

    To benefit the community, posting the discussion from our private comments.

    @Hussein Ismail , as you mentioned -

    "This solved the issue. Thank you very much. I had to use Azure/static-web-apps-deploy@latest instead of @v1 to make it work. But now everything is green again. Thanks. "

    (edit: added above comment from HusseinIsmail)

    Kindly pass this extra flag.

    is_static_export: true

    This is due to recent changes -Please see this announcement, which specifies to use this flag to continue using nextjs export feature
    Azure Static Web Apps now supports server-side rendering for Nextjs applications #921

    Nextjs support on Azure Static Web Apps | Microsoft Learn

    Please let us know, I'll follow-up with you further.

    Much appreciate your patience and collaboration!

    --

    To benefit the community find the right answers, please do mark the post which was helpful by clicking on Accept Answer’ & ‘Up-Vote’.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.