Repository navigation
Fix the Nuxt dev mode integration test - #20564
Conversation
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.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe 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 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 |
|
Summary
The
vite/nuxt.test.ts > dev modeintegration test fails onmainon 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: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 tosafeModulePaths, 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
safeModulePathschange.It also removes the
nitropack: 2.11.0pin. 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:dev modefails with the same 403 as CI.vite: 6.4.3override: both tests pass. This confirms the cause.nitropackpin.CI checks Linux and Windows.
[ci-all]