Azure Static Web Apps workflow file cannot handle i18n routing
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
On deployment of Next.js app with i18n routing, azure web apps gives a strange error after building: `Deployment Failure Reason: Invalid API key.`
**To Reproduce**
1. Clone https://github.com/vercel/next.js/tree/canary/examples/i18n-routing
2. Deploy on Azure web apps automatic workflow (portal)
```js
Running 'npm run build'...
> build
> next build
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
▲ Next.js 15.1.3
Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ...
Collecting page data ...
Generating static pages (0/6) ...
Generating static pages (1/6)
Generating static pages (2/6)
Generating static pages (4/6)
✓ Generating static pages (6/6)
Finalizing page optimization ...
Collecting build traces ...
Route (app) Size First Load JS
┌ ○ /_not-found 979 B 106 kB
└ ● /[lang] 4.02 kB 109 kB
├ /en
├ /de
└ /cs
+ First Load JS shared by all 105 kB
├ chunks/4bd1b696-692f10ba759dfb60.js 52.9 kB
├ chunks/517-baa81dd6794839bb.js 50.5 kB
└ other shared chunks (total) 1.89 kB
ƒ Middleware 39.9 kB
○ (Static) prerendered as static content
● (SSG) prerendered as static HTML (uses generateStaticParams)
Preparing output...
Copying files to destination directory '/bin/staticsites/e64a63f5-f2eb-4b52-ae64-e4c91e04590d-swa-oryx/app'...
Done in 2 sec(s).
Removing existing manifest file
Creating a manifest file...
Manifest file created.
Copying .ostype to manifest output directory.
Done in 29 sec(s).
---End of Oryx build logs---
Try to validate location at: '/bin/staticsites/e64a63f5-f2eb-4b52-ae64-e4c91e04590d-swa-oryx/app/.next'.
Oryx has determined that the app build artifacts are in the '.next' directory. If this is incorrect please specify the app artifact location.
Finished building app with Oryx
Repackaged Next.js app to deploy on the backend.
Starting to build function app with Oryx
---Oryx build logs---
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.20241003.1, Commit: d5352431d933306ccee1be9b5d822c[73](https://github.com/simplechek/next-js-test/actions/runs/12769764934/job/35593054993#step:6:74)bf723e9e, ReleaseTagName: 20241003.1
Build Operation ID: fbf6c92bcad2793b
OS Type : bullseye
Image Type : githubactions
Detecting platforms...
Detected following platforms:
nodejs: 18.20.4
Detected the following frameworks: Next.js
Status: InProgress. Time: 292.5[74](https://github.com/simplechek/next-js-test/actions/runs/12769764934/job/35593054993#step:6:75)224(s)
Status: InProgress. Time: 307.72[75](https://github.com/simplechek/next-js-test/actions/runs/12769764934/job/35593054993#step:6:76)584(s)
Status: InProgress. Time: 322.8718372(s)
Status: InProgress. Time: 338.3753085(s)
Status: InProgress. Time: 353.5265865(s)
Status: InProgress. Time: 369.0473493(s)
Status: InProgress. Time: 384.5221618(s)
Status: InProgress. Time: 400.0182913(s)
Status: InProgress. Time: 415.1710647(s)
Status: InProgress. Time: 430.6600528(s)
Status: InProgress. Time: 445.8134954(s)
Status: InProgress. Time: 460.9432961(s)
Status: InProgress. Time: 4[76](https://github.com/simplechek/next-js-test/actions/runs/12769764934/job/35593054993#step:6:77).0727402(s)
Status: InProgress. Time: 491.2387439(s)
Status: InProgress. Time: 506.3896737(s)
Status: Failed. Time: 521.5074293(s)
Deployment Failed :(
Deployment Failure Reason: Invalid API key.
For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.