Environment
- Operating System: Linux
- Node Version: v18.20.3
- Nuxt Version: 3.12.3
- CLI Version: 3.12.0
- Nitro Version: 2.9.7
- Package Manager: npm@10.2.3
- Builder: -
- User Config: app
- Runtime Modules: -
- Build Modules: -
Reproduction
Using the default stackblitz env, adding a pages/foo.vue page and running nuxt generate.



Describe the bug
Basically, either it doesn't work at all, or the generated content uses absolute URLs.
Additional context
Note that the nuxt dev behavior is not the same.
Logs
❯ nuxt generate
Nuxt 3.12.3 with Nitro 2.9.7 16:53:10
ℹ Using Nitro server preset: static 16:53:11
Using 2024-04-03 as fallback compatibility date. 16:53:14
ℹ Compiled plugins/server.mjs in 643.65ms 16:53:18
ℹ Compiled plugins/client.mjs in 700.86ms 16:53:18
ℹ Compiled types/plugins.d.ts in 707.21ms 16:53:18
ℹ Building client... 16:53:19
ℹ vite v5.3.3 building for production... 16:53:19
ℹ ✓ 121 modules transformed. 16:53:22
ℹ .nuxt/dist/client/manifest.json 1.43 kB │ gzip: 0.36 kB 16:53:23
ℹ .nuxt/dist/client/_nuxt/error-500.DFBAsgKS.css 1.88 kB │ gzip: 0.72 kB 16:53:23
ℹ .nuxt/dist/client/_nuxt/error-404.CjGVuf6H.css 3.56 kB │ gzip: 1.11 kB 16:53:23
ℹ .nuxt/dist/client/_nuxt/YRDkdM7W.js 0.16 kB │ gzip: 0.16 kB 16:53:23
ℹ .nuxt/dist/client/_nuxt/CD5CEudi.js 0.38 kB │ gzip: 0.27 kB 16:53:23
ℹ .nuxt/dist/client/_nuxt/BXJ6MUMY.js 2.77 kB │ gzip: 1.24 kB 16:53:23
ℹ .nuxt/dist/client/_nuxt/D2fwUVQz.js 8.23 kB │ gzip: 3.34 kB 16:53:23
ℹ .nuxt/dist/client/_nuxt/BsnLqlIE.js 151.50 kB │ gzip: 57.50 kB 16:53:23
ℹ ✓ built in 3.30s 16:53:23
✔ Client built in 3314ms 16:53:23
ℹ Building server... 16:53:23
ℹ vite v5.3.3 building SSR bundle for production... 16:53:23
ℹ ✓ 59 modules transformed. 16:53:23
ℹ .nuxt/dist/server/_nuxt/error-404-styles.CibK9Qn2.mjs 0.08 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/error-500-styles.JhxDD0mW.mjs 0.08 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/error-404-styles.WpyeoFtc.mjs 0.15 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/error-500-styles.BFuVBFDJ.mjs 0.15 kB 16:53:24
ℹ .nuxt/dist/server/styles.mjs 0.69 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/foo-7epM7VfU.js 0.70 kB │ map: 0.28 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/index-xyyCGchu.js 0.98 kB │ map: 5.87 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/error-500-styles-1.mjs-D_pjx06j.js 2.10 kB │ map: 0.12 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/error-404-styles-1.mjs-DaBoFDuU.js 3.80 kB │ map: 0.12 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/error-500-vk_nO2f_.js 3.88 kB │ map: 4.59 kB 16:53:24
ℹ .nuxt/dist/server/_nuxt/error-404-JcdXfCG6.js 13.20 kB │ map: 24.34 kB 16:53:24
ℹ .nuxt/dist/server/server.mjs 41.55 kB │ map: 100.04 kB 16:53:24
ℹ ✓ built in 945ms 16:53:24
✔ Server built in 963ms 16:53:24
ℹ Initializing prerenderer nitro 16:53:24
ℹ Prerendering 3 initial routes with crawler nitro 16:53:26
├─ /foo (228ms) nitro 16:53:26
│ └── Error: [404] Page not found: /./foo
├─ /200.html (228ms) nitro 16:53:26
│ └── Error: [404] Page not found: /./200.html
├─ /404.html (228ms) nitro 16:53:26
│ └── Error: [404] Page not found: /./404.html
nitro 16:53:26
Errors prerendering:
├─ /foo (228ms) nitro 16:53:26
│ └── Error: [404] Page not found: /./foo
├─ /200.html (228ms) nitro 16:53:26
│ └── Error: [404] Page not found: /./200.html
├─ /404.html (228ms) nitro 16:53:26
│ └── Error: [404] Page not found: /./404.html
nitro 16:53:26
ERROR Exiting due to prerender errors. 16:53:26
at Module.prerender (node_modules/nitropack/dist/chunks/prerender.mjs:235:11)
at async eval (node_modules/nuxt/dist/index.mjs:3622:7)
at async build (node_modules/nuxt/dist/index.mjs:5486:5)
at async Object.run (node_modules/nuxi/dist/chunks/build.mjs:109:5)
at async Object.run (node_modules/nuxi/dist/chunks/generate.mjs:70:5)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1678:16)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1669:11)
at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1807:7)
ERROR Exiting due to prerender errors.
Environment
Reproduction
Using the default stackblitz env, adding a
pages/foo.vuepage and runningnuxt generate.Describe the bug
Basically, either it doesn't work at all, or the generated content uses absolute URLs.
Additional context
Note that the
nuxt devbehavior is not the same.Logs