Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt generate doesn't respect NITRO_PRESET #555

Closed
flapili opened this issue Oct 30, 2024 · 1 comment · Fixed by #605
Closed

Nuxt generate doesn't respect NITRO_PRESET #555

flapili opened this issue Oct 30, 2024 · 1 comment · Fixed by #605

Comments

@flapili
Copy link

flapili commented Oct 30, 2024

Environment

Working directory: /home/projects/jvmipojzob.github 11:33:49
Nuxt project info: 11:33:49


  • Operating System: Linux
  • Node Version: v18.20.3
  • Nuxt Version: 3.13.2
  • CLI Version: 3.15.1-20241029-161034-45801c0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: default
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-exyn3s?file=nuxt.config.ts,package.json

Describe the bug

Settings firebase as preset in the nuxt config make generate command fails (probably for goods reason), but if we need to produce SPA bundle the generate command fail even if we set the NITRO_PRESET="node-server"

Also, I confirm that this issue differ from #514 as this fix cover build command but not generate

Additional context

I would like to make a SPA bundle for tauri, for now I think I can use .outpup/public

Logs

❯ NITRO_PRESET="node-server" npx nuxi-nightly@latest generate
Nuxt 3.13.2 with Nitro 2.9.7 11:42:29
ℹ Using Nitro server preset: static 11:42:30
ℹ Compiled plugins/server.mjs in 573.01ms 11:42:38
ℹ Compiled plugins/client.mjs in 659.43ms 11:42:38
ℹ Compiled types/plugins.d.ts in 660.1ms 11:42:38
ℹ Building client... 11:42:39
ℹ vite v5.4.10 building for production... 11:42:39
ℹ ✓ 132 modules transformed. 11:42:43
ℹ .nuxt/dist/client/manifest.json 1.06 kB │ gzip: 0.29 kB 11:42:44
ℹ .nuxt/dist/client/_nuxt/error-500.D6506J9O.css 1.88 kB │ gzip: 0.72 kB 11:42:44
ℹ .nuxt/dist/client/_nuxt/error-404.CoZKRZXM.css 3.56 kB │ gzip: 1.11 kB 11:42:44
ℹ .nuxt/dist/client/_nuxt/entry.CUu_uq46.css 12.40 kB │ gzip: 2.56 kB 11:42:44
ℹ .nuxt/dist/client/_nuxt/BjaSqDll.js 3.39 kB │ gzip: 1.53 kB 11:42:44
ℹ .nuxt/dist/client/_nuxt/C9ZzfywT.js 9.25 kB │ gzip: 3.72 kB 11:42:44
ℹ .nuxt/dist/client/_nuxt/CshlWRuv.js 218.95 kB │ gzip: 62.43 kB 11:42:44
ℹ ✓ built in 4.20s 11:42:44
✔ Client built in 4203ms 11:42:44
ℹ Building server... 11:42:44
ℹ vite v5.4.10 building SSR bundle for production... 11:42:44
ℹ ✓ 1 modules transformed. 11:42:44
ℹ .nuxt/dist/server/styles.mjs 0.07 kB 11:42:44
ℹ .nuxt/dist/server/server.mjs 0.10 kB │ map: 0.22 kB 11:42:44
ℹ ✓ built in 100ms 11:42:44
✔ Server built in 150ms 11:42:44
ℹ Initializing prerenderer nitro 11:42:44
ℹ Prerendering 3 routes nitro 11:42:46
├─ /200.html (364ms) nitro 11:42:47
├─ /404.html (361ms) nitro 11:42:47
├─ /index.html (362ms) nitro 11:42:47
ℹ Prerendered 3 routes in 2.393 seconds nitro 11:42:47

[nitro 11:42:47] WARN Neither firebase.gen or NITRO_FIREBASE_GEN is set. Nitro will default to Cloud Functions 1st generation. It is recommended to set this to the latest generation (currently 2). Set the version to remove this warning. See https://nitro.unjs.io/deploy/providers/firebase for more information.

✔ Generated public .output/public nitro 11:42:47

ERROR ENOENT: no such file or directory, open '/home/projects/jvmipojzob.github/.output/server/package.json' 11:42:47

ERROR ENOENT: no such file or directory, open '/home/projects/jvmipojzob.github/.output/server/package.json' 11:42:47

~/projects/jvmipojzob.github 22s

Copy link

stackblitz bot commented Oct 30, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@danielroe danielroe transferred this issue from nuxt/nuxt Nov 4, 2024
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 a pull request may close this issue.

1 participant