#Issues with Azure deployment

13 messages · Page 1 of 1 (latest)

violet iron
#

I'm currently trying to deploy via Azure, and it's giving me quite a few issues. I thought that the problem was that Azure wasn't using the Azure build flag, so I used npx nuxi build --preset=azure as the build command per the docs recommendation, and issues were still cropping up. I eventually realized that runtimeConfig doesn't get passed from nuxt.config.ts, but fixing that also did not solve anything.

I am entirely confused as to why everything is working perfectly fine locally (running npx nuxi build --preset=azure and npx @azure/static-web-apps-cli start .output/public --api-location .output/server per the docs) but leaving me with a beautiful 404 page when put through the github pipeline.

#

Issues with Azure deployment

vestal geyser
#

Are you deploying to a Static Web App and using the Nuxt 3 build preset via the Azure Dashboard?

robust timber
#

If so, did you include public/staticwebapp.config.json with navigation fallback rules?

{
  "navigationFallback": {
    "rewrite": "index.html",
    "exclude": ["/assets/*."]
  },
  // headers...
}
violet iron
#

I realized before I went to sleep this might’ve been an issue

violet iron
violet iron
#

Okay so whatever the issue is, it has something to do with how Azure makes the GitHub action. Deploying from the CLI (well— 1.1.10, 2.0.x is broken for some reason) works perfectly. So whatever the issue is, it has something to do with the deployment action.

#

I checked the action— it isn’t an issue of the build command. I set build to preset=azure, and it was choosing the correct build preset in the action logs

#

@vestal geyser any ideas? I’m stumped

vestal geyser
#

@violet iron I use Azure DevOps for deployment and that works for me out of the box. Sorry can't be of anymore help.

violet iron