Skip to content

Commit 72d75eb

Browse files
os-elonclaude
andauthored
fix(docs): drop output: 'standalone' so the production docs build stops failing (#10652)
The production build died at the end of `next build` with ENOENT on `apps/docs/.next/next-server.js.nft.json`, so no page merged to `main` was reaching the site. That file is opened by `copyTracedFiles` (next/dist/build/utils.js), reached only from `writeStandaloneDirectory` (next/dist/build/index.js), which Next calls only under `if (config.output === 'standalone')`. Removing the setting removes the only code path that performs that read. Nothing in this repo consumes `.next/standalone`: no Dockerfile, workflow, script or config references the path, and `docker/Dockerfile` does not build apps/docs at all. Vercel does its own serverless packaging, so the setting had no consumer on this deployment target. Claude-Session: https://claude.ai/code/session_01GawRwpD44VwBDVy3hs77AX Co-authored-by: Claude <noreply@anthropic.com>
1 parent e300b28 commit 72d75eb

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/docs': patch
3+
---
4+
5+
docs site: drop `output: 'standalone'` so the production build stops failing
6+
7+
The production build of the docs site died at the end of `next build` with
8+
`ENOENT: no such file or directory, open '.../apps/docs/.next/next-server.js.nft.json'`,
9+
so nothing merged to `main` reached the site.
10+
11+
That file is opened by the standalone packer (`writeStandaloneDirectory` ->
12+
`copyTracedFiles`), which Next calls **only** when `output === 'standalone'`.
13+
Nothing in this repo consumes `.next/standalone` — no Dockerfile, workflow,
14+
script or config references it, and `docker/Dockerfile` does not build
15+
`apps/docs` at all — and Vercel does its own serverless packaging. The setting
16+
served no consumer and was the sole reason that read happened, so removing it
17+
removes the only code path that can raise this error.

apps/docs/next.config.mjs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,19 @@ const withMDX = createMDX();
66
/** @type {import('next').NextConfig} */
77
const config = {
88
reactStrictMode: true,
9-
output: 'standalone',
9+
// No `output: 'standalone'` here on purpose. The standalone packer
10+
// (`writeStandaloneDirectory` -> `copyTracedFiles`) opens
11+
// `.next/next-server.js.nft.json`, and that open is the ONLY thing in a
12+
// production build that reads it. Vercel builds this app with Turbopack via
13+
// `vercel.json`'s `pnpm turbo run build --filter=@objectstack/docs`, and the
14+
// production build died there with ENOENT on that file while the same cold
15+
// build passes locally -- so the trace set is absent under Vercel's builder
16+
// specifically. Nothing in this repo consumes `.next/standalone`: no
17+
// Dockerfile, workflow, script or config references it, and `docker/Dockerfile`
18+
// does not build apps/docs at all. Vercel does its own serverless packaging,
19+
// so the setting bought nothing here and cost the whole deployment. If this
20+
// app ever gains a self-hosted Node target that needs the standalone bundle,
21+
// reintroduce it together with a builder that emits the trace set.
1022
experimental: {
1123
// The docs site prerenders 400+ MDX pages. Next spawns one static-generation
1224
// worker per CPU, and on Vercel's high-core build container that fan-out

0 commit comments

Comments
 (0)