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

404 error after running npx nuxi generate with app.baseURL set. #2579

Closed
khopha opened this issue Jul 2, 2024 · 1 comment
Closed

404 error after running npx nuxi generate with app.baseURL set. #2579

khopha opened this issue Jul 2, 2024 · 1 comment

Comments

@khopha
Copy link

khopha commented Jul 2, 2024

Environment

  • Operating System: Linux
  • Node Version: v18.20.3
  • Nuxt Version: 3.12.2
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.7
  • Package Manager: npm@10.2.3
  • Builder: -
  • User Config: devtools, app
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-zk6sfo

Steps:

  1. Set app.baseURL in nuxt.config.ts.
  2. Run npx nuxi generate.
  3. Run npm run preview.
  4. Click the links in the generated HTML.

Describe the bug

The links in the generated HTML navigate to a 404 error. After removing base from the URL, it works correctly. For example, localhost/base/about results in a 404 error, whereas localhost/about is correct.

Additional context

Reported in nuxt/nuxt#27923

Logs

No response

@danielroe
Copy link
Member

Thank you so much! I've created #2580 as a tracker issue which I think should fully resolve this. Let's track there. (Sorry for asking you to create this and then creating another issue instead. 🤦)

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants