Skip to content

Fix the Nuxt dev mode integration test - #20564

Merged
RobinMalfait merged 2 commits into
mainfrom
robin/fix-nuxt-dev-mode-integration-test
Oct 12, 2026
Merged

RobinMalfait merged 2 commits into
mainfrom
robin/fix-nuxt-dev-mode-integration-test

Conversation

@RobinMalfait

Copy link
Copy Markdown
Contributor

Summary

The vite/nuxt.test.ts > dev mode integration test fails on main on Linux, macOS and Windows since Vite 6.4.4 (released on 2026-10-06). The SSR render of / crashes, so the page has no styles:

[GET] "http://[::1]:3000/__nuxt_vite_node__/module//node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs": 403 Forbidden

Nuxt 3.16.0 serves vite-node modules over HTTP. For each module id, it calls Vite's isFileServingAllowed(config, id). These ids are root-relative URLs, like /node_modules/.pnpm/.... Before Vite 6.4.4, the import analysis plugin added these URLs to safeModulePaths, so the check passed. Vite 6.4.4 adds the resolved file paths instead (vitejs/vite#23656), so the check now rejects the root-relative ids.

All Nuxt versions before 3.18.0 do this check. Nuxt 3.18.0 and later serve vite-node modules over an IPC socket without it. This PR moves the test to Nuxt 3.21.11, the latest 3.x release. It runs on Vite 7.3.7, which has the same safeModulePaths change.

It also removes the nitropack: 2.11.0 pin. Nuxt 3.21 gets Nitro through @nuxt/nitro-server (nitropack@^2.13.4), so nothing used the pinned copy.

Test plan

Locally on macOS, with pnpm vitest --root=./integrations run vite/nuxt.test.ts:

  • Nuxt 3.16.0 and Vite 6.4.4: dev mode fails with the same 403 as CI.
  • Nuxt 3.16.0 with a vite: 6.4.3 override: both tests pass. This confirms the cause.
  • Nuxt 3.21.11: both tests pass in 3 of 3 runs, with and without the nitropack pin.

CI checks Linux and Windows.

[ci-all]

The `vite/nuxt.test.ts > dev mode` test fails on `main` since Vite 6.4.4
(2026-10-06). The SSR render of `/` crashes, so the page has no styles:

    [GET] "http://[::1]:3000/__nuxt_vite_node__/module//node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/node.mjs": 403 Forbidden

Nuxt 3.16.0 serves vite-node modules over HTTP. For each module id, it
calls Vite's `isFileServingAllowed(config, id)`. The ids are root-relative
URLs, like `/node_modules/.pnpm/...`. Before Vite 6.4.4, the import
analysis plugin added these URLs to `safeModulePaths`, so the check
passed. Vite 6.4.4 (vitejs/vite#23656) adds the resolved file paths
instead, so the check now rejects the root-relative ids with a 403.

All Nuxt versions before 3.18.0 do this check. Nuxt 3.18.0 and later
serve vite-node modules over an IPC socket without it, so they work with
the fixed Vite (Vite 7.3.7 has the same change). This moves the test to
the latest Nuxt 3 release, which uses Vite 7.3.7.
The `nitropack: 2.11.0` dependency pinned the Nitro version of the old
Nuxt release. Nuxt 3.21 gets Nitro through `@nuxt/nitro-server`, which
needs `nitropack@^2.13.4`. So pnpm installs a second Nitro for Nuxt, and
nothing uses the pinned 2.11.0 copy.
@RobinMalfait
RobinMalfait requested a review from a team as a code owner October 12, 2026 14:59
@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Reviews (1) · Last reviewed commit: "Remove the unused `nitropack` pin from t..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f035194c-b567-429f-9d73-306b05415616

📥 Commits

Reviewing files that changed from the base of the PR and between 392fb6d and 1ca3a7c.


📒 Files selected for processing (1)
  • integrations/vite/nuxt.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.



Walkthrough

The Nuxt test fixture now uses Nuxt 3.21.11 instead of 3.16.0 and no longer pins nitropack to a specific version.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 1ca3a

The fixture update has no established merge-blocking issue, and the reported tests pass. The exact Nitro resolution and default Windows coverage remain unconfirmed.

Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the main change: fixing the Nuxt development-mode integration test.
Description check Passed The description directly explains the failure, root cause, version changes, removed pin, and test results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RobinMalfait
RobinMalfait merged commit c56200d into main Oct 12, 2026
24 checks passed
@RobinMalfait
RobinMalfait deleted the robin/fix-nuxt-dev-mode-integration-test branch October 12, 2026 15:12
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.

1 participant