vercel / vercel/next.js

output: "standalone" + next-i18next: user config not copied into standalone output on 16.3.x (regression from 16.2.x)

Open
#98,628 1 comment 0 reactions 0 assignees View on GitHub

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
  1. git clone https://github.com/nitipat009/next-standalone-i18next-repro
  2. cd next-standalone-i18next-repro && npm install
  3. npm run build
  4. ls .next/standalone/next-i18next.config.js — file is missing
  5. node .next/standalone/server.js then curl 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.