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 preview not working anymore after nuxt generate #1439

Open
1 task done
codeflorist opened this issue May 8, 2024 · 0 comments
Open
1 task done

nuxt preview not working anymore after nuxt generate #1439

codeflorist opened this issue May 8, 2024 · 0 comments

Comments

@codeflorist
Copy link

Describe the bug

Currently, when running nuxt preview to preview a nuxt application built with nuxt generate, the following error is thrown:

 ERROR  Command failed with exit code 13: npx serve ./public                                                                            11:06:18

  at makeError (node_modules/nuxi/dist/chunks/index3.mjs:1292:11)
  at handlePromise (node_modules/nuxi/dist/chunks/index3.mjs:2530:26)
  at async Object.run (node_modules/nuxi/dist/chunks/preview.mjs:141:5)
  at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.9edf0930.mjs:1678:16)
  at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.9edf0930.mjs:1669:11)
  at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.9edf0930.mjs:1807:7) 

This was definitely working a while (maybe 2-3 weeks) ago. I also don't think that a Nuxt-update caused this, since the current Nuxt version (v3.11.2) came out more than a month ago, and i definitely had stackblitzes like this working in the meantime. I also tried with v3.11.1 and it has the same problem.

It is worth noting, that it is still working using nuxt build instead of nuxt generate.

Link to the blitz that caused the error

https://stackblitz.com/edit/nuxt-starter-zrndgf?file=package.json

Steps to reproduce

  1. launch the stackblitz
  2. i have the startCommand set to npm run generate && npm run preview, so you just have to press y when asked to install the serve package.

Expected behavior

No error being thrown - instead the generated site should be served.

Parity with Local

Screenshots

No response

Platform

Browser name  = Chrome
Full version  = 124.0.0.0
Major version = 124
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 93891146,
  "usedJSHeapSize": 75402534,
  "jsHeapSizeLimit": 4294705152
}
Hash = 34455753

Additional context

No response

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

No branches or pull requests

1 participant