Apologies for the delayed response from over the weekend.
Based on the issue description, I understand you mentioned that you didn't install other packages via yarn and are using the default Azure pipeline YAML file. Also, no, app router.
You may try the following steps to isolate the issue:
1. You may always leverage Azure Static Web Apps diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal.
In the left navigation, click on Diagnose and solve problems
- Review and run - “Configuration and Management”
-Azure Static Web Apps diagnostics overview
2. Kindly your app_location and output_location in the Azure pipeline YAML file are correctly set. The app_location should point to the root of your Next.js app, and the output_location should point to the .next folder after the build.
- Review the Build and Deployment Logs to fetch more info.
You may define a fallback rule by adding a navigationFallback section.
Use staticwebapp.config.json as described in this article to configure routing and other settings for your static web app.
-Build configuration for Azure Static Web Apps
Kindly let us know, I'll follow-up with you further.