Skip to content

test(hosting): work around Nuxt Windows prerender build failure (nuxt#36467) - #3359

Merged
sarayev merged 2 commits into
mainfrom
fix/standalone-hosting-nuxt-pin-toolchain
Oct 8, 2026
Merged

sarayev merged 2 commits into
mainfrom
fix/standalone-hosting-nuxt-pin-toolchain

Conversation

@sarayev

@sarayev sarayev commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The standalone-hosting-nuxt e2e fixture fails to build on windows-2025. During the test, ampx deploy runs npm run build (nuxt build), which prerenders /about. vue-bundle-renderer throws Either manifest or precomputed data must be provided, Nitro exits 1, and the deploy fails as NitroBuildError -> AssemblyError -> BackendBuildError before any CloudFormation deploy happens.

Root cause

This is nuxt/nuxt#36467, a Windows-only Nitro bug introduced in Nuxt 4.6.0. On Windows the Nitro externals plugin resolves a backslash path for the Nuxt renderer (D:\...\node_modules\nuxt\dist\...), and the inline-match rule 'nuxt/dist' never matches a backslash path, so the renderer is left external. The external renderer then loads placeholder stub modules (e.g. precomputed.js = const stub = void 0), so createRenderer() gets neither a manifest nor precomputed data and every SSR/prerender render 500s.

It reproduces only on Windows; the same fixture builds green on Linux at every Nuxt 4.x, which is why only the windows-2025 shard fails.

Fix

Apply the upstream-reported workaround: force-inline the Nuxt renderer via nitro.externals.inline. This is config-only on the test fixture, with no dependency or source changes, and is a no-op on Linux (same server output). It is version-independent, so it survives future Nuxt bumps rather than freezing a toolchain version.

nitro: {
  externals: { inline: [/[\\/]node_modules[\\/]nuxt[\\/]dist[\\/]/] },
}

Verification

  • Install + nuxt build green on Linux with and without the change (Linux never reproduces the bug).
  • @aws-amplify/integration-tests is private, so no changeset is required.
  • The authoritative proof is the windows-2025 hosting e2e on this branch.

Note

This fixes the fixture flake on main and is independent of the backend-deployer release PR #3357; it does not block that release.

@changeset-bot

changeset-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7372287

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

The standalone-hosting-nuxt e2e fixture fails to build on windows-2025:
nuxt build prerenders /about, vue-bundle-renderer throws "Either manifest
or precomputed data must be provided", Nitro exits 1 and ampx deploy fails
before any deploy runs.

Root cause is nuxt/nuxt#36467: on Windows the Nitro externals plugin
resolves a backslash path for the Nuxt renderer and the inline-match rule
("nuxt/dist") never matches backslashes, so the renderer is left external
and loads stub manifest/precomputed modules. Force-inlining the renderer
via nitro.externals.inline fixes the Windows build and is a no-op on Linux.

Config-only change to the test fixture; no dependency or source changes.
@sarayev
sarayev force-pushed the fix/standalone-hosting-nuxt-pin-toolchain branch from 4fee626 to c0c57e2 Compare October 7, 2026 18:23
@sarayev sarayev changed the title test(hosting): pin standalone-hosting-nuxt toolchain test(hosting): work around Nuxt Windows prerender build failure (nuxt#36467) Oct 7, 2026
@sarayev
sarayev marked this pull request as ready for review October 8, 2026 06:21
@sarayev
sarayev requested a review from a team as a code owner October 8, 2026 06:21
@sarayev
sarayev merged commit 04c2dab into main Oct 8, 2026
121 checks passed
@sarayev
sarayev deleted the fix/standalone-hosting-nuxt-pin-toolchain branch October 8, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants