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

Cannot render error page during SSR if app.baseURL is configured #15437

Closed
tobyfaux opened this issue Nov 10, 2022 · 0 comments · Fixed by nuxt/framework#8888
Closed

Cannot render error page during SSR if app.baseURL is configured #15437

tobyfaux opened this issue Nov 10, 2022 · 0 comments · Fixed by nuxt/framework#8888

Comments

@tobyfaux
Copy link
Contributor

Environment

  • Operating System: Darwin
  • Node Version: v16.13.0
  • Nuxt Version: 3.0.0-rc.13
  • Nitro Version: 0.6.1
  • Package Manager: yarn@1.22.18
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-wd3wwv-fwhksj?file=nuxt.config.ts

Describe the bug

If app.baseURL is configured, rendering an error page during SSR will fail with a message like this:

Cannot find any route matching /__nuxt_error?url=/&statusCode=404&statusMessage=Cannot+find+any+route+matching+/.&message=Cannot+find+any+route+matching+/.&stack&data.

I'll try to submit a PR for this shortly.

Additional context

It looks like this might have been introduced in nuxt/framework#8469:

https://github.com/nuxt/framework/blob/4311ce79f631a2599b233ead94642bf8cfc6f46e/packages/nuxt/src/core/runtime/nitro/error.ts#L51

With localFetch being used instead of $fetch, the baseURL option set here is no longer used.

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants