From 3b7c37f5eeff5a14c910bbfb587cb1b93c47f35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?batuhan=20i=C3=A7=C3=B6z?= Date: Mon, 16 Nov 2026 23:43:02 +0100 Subject: [PATCH 1/2] Document Next.js 16.4 server builds Next 16.4.5 and later 16.4 releases build with server rendering through the Spacefast adapter; 16.4.0 to 16.4.4 stay export-only. --- content/(publish)/frameworks.mdx | 4 ++-- content/(publish)/migrate-from/vercel.mdx | 4 ++-- content/(publish)/recipes/next.mdx | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/content/(publish)/frameworks.mdx b/content/(publish)/frameworks.mdx index 838b6a19..a9b28d2d 100644 --- a/content/(publish)/frameworks.mdx +++ b/content/(publish)/frameworks.mdx @@ -228,9 +228,9 @@ Same routing conventions as the Astro integration, plus a check that the build i ### `@spacefast/next-adapter` -Wired for you. When `sf publish` runs `next build` on Next 16.2 or 16.3, it points Next at the bundled adapter through `NEXT_ADAPTER_PATH`, so there is nothing to add to `next.config`. The adapter opts the build into immutable static assets and writes down what Next produced for the classifier to read. +Wired for you. When `sf publish` runs `next build` on Next 16.2, 16.3, or 16.4.5 and later, it points Next at the bundled adapter through `NEXT_ADAPTER_PATH`, so there is nothing to add to `next.config`. The adapter opts the build into immutable static assets and writes down what Next produced for the classifier to read. -The adapter runs on Next 16.2 and 16.3, the releases with the `experimental.adapterPath` hook it needs. Server-rendered builds also work on Next 15.5.24 and later 15.5 releases without the adapter. Other releases from 14.2 through 16.4 build only with `output: "export"`. See the [Next.js recipe](/recipes/next) for the full table. +The adapter runs on Next 16.2, 16.3, and 16.4.5 and later 16.4 releases. 16.4.0 to 16.4.4 predate the Next.js November security release, which the server bundler requires. Server-rendered builds also work on Next 15.5.24 and later 15.5 releases without the adapter. Other releases from 14.2 through 16.4 build only with `output: "export"`. See the [Next.js recipe](/recipes/next) for the full table. ## Next steps diff --git a/content/(publish)/migrate-from/vercel.mdx b/content/(publish)/migrate-from/vercel.mdx index ef41d8fe..2de0a6cf 100644 --- a/content/(publish)/migrate-from/vercel.mdx +++ b/content/(publish)/migrate-from/vercel.mdx @@ -64,9 +64,9 @@ A Spacefast cron is a scheduled `GET` against a path on your own Space, like a V | Next.js | What runs | | --- | --- | -| 16.2.x, 16.3.x | Server-rendered builds, through the adapter `sf publish` wires in for you | +| 16.2.x, 16.3.x, 16.4.5 and later 16.4 releases | Server-rendered builds, through the adapter `sf publish` wires in for you | | 15.5.24 and later 15.5 releases | Server-rendered builds | -| 14.2, 15.0 to 15.5.23, 16.0, 16.1, 16.4 | `output: "export"` only | +| 14.2, 15.0 to 15.5.23, 16.0, 16.1, 16.4.0 to 16.4.4 | `output: "export"` only | Other versions are refused before anything builds. The [Next.js recipe](/recipes/next) has the details and the export fallback. diff --git a/content/(publish)/recipes/next.mdx b/content/(publish)/recipes/next.mdx index f0c806e6..98d7f70b 100644 --- a/content/(publish)/recipes/next.mdx +++ b/content/(publish)/recipes/next.mdx @@ -7,15 +7,15 @@ Next.js is detected by its `next` dependency. A project that also depends on `ne ## What to build -The default `next build`. On Next 16.2 and 16.3, the CLI first points Next at the bundled `@spacefast/next-adapter` through the `NEXT_ADAPTER_PATH` environment variable, so there is nothing to add to `next.config`. The adapter opts the build into immutable static assets and writes down what Next produced for the classifier to read. +The default `next build`. On Next 16.2, 16.3, and 16.4.5 or later, the CLI first points Next at the bundled `@spacefast/next-adapter` through the `NEXT_ADAPTER_PATH` environment variable, so there is nothing to add to `next.config`. The adapter opts the build into immutable static assets and writes down what Next produced for the classifier to read. ## Supported Next versions | Next.js | Server-rendered build | `output: "export"` | | --- | --- | --- | -| 16.2.x, 16.3.x | Yes, through the bundled adapter | Yes | +| 16.2.x, 16.3.x, 16.4.5 and later 16.4 releases | Yes, through the bundled adapter | Yes | | 15.5.24 and later 15.5 releases | Yes | Yes | -| 14.2, 15.0 to 15.5.23, 16.0, 16.1, 16.4 | No | Yes | +| 14.2, 15.0 to 15.5.23, 16.0, 16.1, 16.4.0 to 16.4.4 | No | Yes | Only stable releases count; canary and other prerelease versions are refused. @@ -61,4 +61,4 @@ npx next build sf publish ./out --prebuilt ``` -One related failure mode on Next 16.2 and 16.3. If a custom build command runs `next build` in a way that loses the environment the CLI set, the adapter never runs. The publish then stops with `build_failed`, saying `.spacefast/next-build.json` was not written. Let the CLI invoke the build, or pass its environment through your wrapper. +One related failure mode on the adapter releases (16.2, 16.3, and 16.4). If a custom build command runs `next build` in a way that loses the environment the CLI set, the adapter never runs. The publish then stops with `build_failed`, saying `.spacefast/next-build.json` was not written. Let the CLI invoke the build, or pass its environment through your wrapper. From eec62c37639b21e970ead748f2aff7506a760eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?batuhan=20i=C3=A7=C3=B6z?= Date: Tue, 17 Nov 2026 00:00:49 +0100 Subject: [PATCH 2/2] Document the Next.js versions Spacefast builds Spacefast now builds exactly the Next.js releases OpenNext 1.20.17 supports, 15.5.29+ and 16.4.5+, and refuses older releases because each has published security advisories. --- content/(publish)/frameworks.mdx | 4 ++-- content/(publish)/migrate-from/vercel.mdx | 7 +++---- content/(publish)/recipes/next.mdx | 19 +++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/content/(publish)/frameworks.mdx b/content/(publish)/frameworks.mdx index a9b28d2d..fbb68ee2 100644 --- a/content/(publish)/frameworks.mdx +++ b/content/(publish)/frameworks.mdx @@ -228,9 +228,9 @@ Same routing conventions as the Astro integration, plus a check that the build i ### `@spacefast/next-adapter` -Wired for you. When `sf publish` runs `next build` on Next 16.2, 16.3, or 16.4.5 and later, it points Next at the bundled adapter through `NEXT_ADAPTER_PATH`, so there is nothing to add to `next.config`. The adapter opts the build into immutable static assets and writes down what Next produced for the classifier to read. +Wired for you. When `sf publish` runs `next build` on Next 16.4.5 and later 16.4 releases, it points Next at the bundled adapter through `NEXT_ADAPTER_PATH`, so there is nothing to add to `next.config`. The adapter opts the build into immutable static assets and writes down what Next produced for the classifier to read. -The adapter runs on Next 16.2, 16.3, and 16.4.5 and later 16.4 releases. 16.4.0 to 16.4.4 predate the Next.js November security release, which the server bundler requires. Server-rendered builds also work on Next 15.5.24 and later 15.5 releases without the adapter. Other releases from 14.2 through 16.4 build only with `output: "export"`. See the [Next.js recipe](/recipes/next) for the full table. +Server-rendered builds also work on Next 15.5.29 and later 15.5 releases without the adapter. Older releases have known security vulnerabilities, so Spacefast refuses to build them. See the [Next.js recipe](/recipes/next) for the full table. ## Next steps diff --git a/content/(publish)/migrate-from/vercel.mdx b/content/(publish)/migrate-from/vercel.mdx index 2de0a6cf..84cd0c4b 100644 --- a/content/(publish)/migrate-from/vercel.mdx +++ b/content/(publish)/migrate-from/vercel.mdx @@ -64,11 +64,10 @@ A Spacefast cron is a scheduled `GET` against a path on your own Space, like a V | Next.js | What runs | | --- | --- | -| 16.2.x, 16.3.x, 16.4.5 and later 16.4 releases | Server-rendered builds, through the adapter `sf publish` wires in for you | -| 15.5.24 and later 15.5 releases | Server-rendered builds | -| 14.2, 15.0 to 15.5.23, 16.0, 16.1, 16.4.0 to 16.4.4 | `output: "export"` only | +| 16.4.5 and later 16.4 releases | Server-rendered builds, through the adapter `sf publish` wires in for you | +| 15.5.29 and later 15.5 releases | Server-rendered builds | -Other versions are refused before anything builds. The [Next.js recipe](/recipes/next) has the details and the export fallback. +Older releases have known security vulnerabilities, so they are refused before anything builds, with the version to upgrade to. The [Next.js recipe](/recipes/next) has the details and the export fallback. ## What doesn't diff --git a/content/(publish)/recipes/next.mdx b/content/(publish)/recipes/next.mdx index 98d7f70b..378116a7 100644 --- a/content/(publish)/recipes/next.mdx +++ b/content/(publish)/recipes/next.mdx @@ -1,23 +1,22 @@ --- title: Next.js -description: Build a Next.js app with the bundled Spacefast adapter, or publish a static export from an older Next +description: Build a Next.js app with the bundled Spacefast adapter on a supported, patched Next release --- Next.js is detected by its `next` dependency. A project that also depends on `nextra` matches the Nextra row instead, which builds and outputs the same way. ## What to build -The default `next build`. On Next 16.2, 16.3, and 16.4.5 or later, the CLI first points Next at the bundled `@spacefast/next-adapter` through the `NEXT_ADAPTER_PATH` environment variable, so there is nothing to add to `next.config`. The adapter opts the build into immutable static assets and writes down what Next produced for the classifier to read. +The default `next build`. On Next 16.4.5 and later 16.4 releases, the CLI first points Next at the bundled `@spacefast/next-adapter` through the `NEXT_ADAPTER_PATH` environment variable, so there is nothing to add to `next.config`. The adapter opts the build into immutable static assets and writes down what Next produced for the classifier to read. ## Supported Next versions | Next.js | Server-rendered build | `output: "export"` | | --- | --- | --- | -| 16.2.x, 16.3.x, 16.4.5 and later 16.4 releases | Yes, through the bundled adapter | Yes | -| 15.5.24 and later 15.5 releases | Yes | Yes | -| 14.2, 15.0 to 15.5.23, 16.0, 16.1, 16.4.0 to 16.4.4 | No | Yes | +| 16.4.5 and later 16.4 releases | Yes, through the bundled adapter | Yes | +| 15.5.29 and later 15.5 releases | Yes | Yes | -Only stable releases count; canary and other prerelease versions are refused. +Spacefast builds the same releases its server bundler, OpenNext, supports. Its minimum versions follow Next.js security releases, so every older release has published [security advisories](https://github.com/vercel/next.js/security/advisories), and Spacefast refuses to build it. Only stable releases count; canary and other prerelease versions are refused. ## The output directory @@ -42,15 +41,15 @@ Published: https://quiet-harbor.space.fast ## The gotcha -Both refusals fail with this code: +A version outside the table fails with this code, before anything builds, and exits with code 2: ```text next_version_unsupported ``` -A version outside the table stops before anything builds. A server-rendered config on an export-only version runs `next build` first, then stops once the CLI sees the output is not an export. Both exit with code 2. There is no guessing fallback, because a publish classified from guessed facts is worse than a refused one. +For an older release, the error says it has known security vulnerabilities and names the version to upgrade to. Upgrade, then publish again. There is no guessing fallback, because a publish classified from guessed facts is worse than a refused one. -On an export-only version, set `output: "export"` and let `sf publish` build it. On an unsupported version, do the export yourself and upload it: +If you can't upgrade yet, build a static export yourself and upload it: ```js next.config.js module.exports = { output: "export" }; @@ -61,4 +60,4 @@ npx next build sf publish ./out --prebuilt ``` -One related failure mode on the adapter releases (16.2, 16.3, and 16.4). If a custom build command runs `next build` in a way that loses the environment the CLI set, the adapter never runs. The publish then stops with `build_failed`, saying `.spacefast/next-build.json` was not written. Let the CLI invoke the build, or pass its environment through your wrapper. +One related failure mode on Next 16.4. If a custom build command runs `next build` in a way that loses the environment the CLI set, the adapter never runs. The publish then stops with `build_failed`, saying `.spacefast/next-build.json` was not written. Let the CLI invoke the build, or pass its environment through your wrapper.