output: "standalone" + next-i18next: user config not copied into standalone output on 16.3.x (regression from 16.2.x)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.5k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/nitipat009/next-standalone-i18next-repro
To Reproduce
git clone https://github.com/nitipat009/next-standalone-i18next-reprocd next-standalone-i18next-repro && npm installnpm run buildls .next/standalone/next-i18next.config.js— file is missingnode .next/standalone/server.jsthencurl http://localhost:3000/— returns 500
Current vs. Expected behavior
With output: "standalone" and next-i18next's standard setup (appWithTranslation in _app, serverSideTranslations in a page's getServerSideProps), I expected next-i18next.config.js to be copied into .next/standalone/ as it is on next@16.2.12. Instead, on next@16.3.0 and later it is missing, and the standalone server throws Error: next-i18next was unable to find a user config at /app/next-i18next.config.js on any request.
Bisection (change the next version in package.json of the repro repo and repeat the steps above):
next version |
next-i18next.config.js in .next/standalone/ |
Request result |
|---|---|---|
16.2.12 |
present | 200 OK |
16.3.0+ |
missing | 500 |
Build uses next build --webpack (Turbopack is not involved).
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0
Binaries:
Node: 22.15.0
npm: 10.9.2
Relevant Packages:
next: 16.3.0 (also reproduces on 16.3.1-16.3.5)
next-i18next: 15.4.3
react: 19.2.1
react-dom: 19.2.1
Next.js Config:
output: standalone
Which area(s) are affected?
Output (export/standalone), Webpack, Internationalization (i18n)
Which stage(s) are affected?
next build (local), next start (local)
Additional context
Follow-up to #98626 and #98625, both auto-closed for a missing/invalid reproduction link — apologies, the link is now the sole content of the "Link to the code that reproduces this issue" field.
I am hosting via Docker with output: "standalone", but the issue reproduces the same way with a plain node .next/standalone/server.js locally, no Docker required.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked next-standalone-i18next-repro repository and compare the standalone output from next@16.2.12 with 16.3.0 using npm run build. Inspect how the webpack standalone build handles next-i18next.config.js, then verify that .next/standalone/next-i18next.config.js is present and that node .next/standalone/server.js followed by curl returns 200.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, node.js, react, webpack
- Domain
- build-system, internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100