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

useTranslation errors when used inside a Nitro request hook #31

Open
5 tasks done
GalacticHypernova opened this issue Jul 6, 2024 · 0 comments
Open
5 tasks done
Labels
status: review needed Request for review

Comments

@GalacticHypernova
Copy link

GalacticHypernova commented Jul 6, 2024

Describe the bug

When used inside a Nitro request hook, useTranslation (for server-side translation) errors:
image

Reproduction

nitroApp.hooks.hook("request", async (event) => { const t = await useTranslation(event) })

System Info

------------------------------
- Operating System: Linux
- Node Version:     v21.1.0
- Nuxt Version:     3.11.2
- CLI Version:      3.12.0
- Nitro Version:    2.9.6
- Package Manager:  [email protected]
- Builder:          -
- User Config:      nitro, i18n, devtools, runtimeConfig, experimental, vite
- Runtime Modules:  @nuxtjs/[email protected]
- Build Modules:    -
------------------------------

Used Package Manager

n/a

Additional context

The reproduction provided is extremely minimal as that's all that needs to be done in order to trigger the error. If necessary, I can provide a less minimal reproduction, please do let me know!

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@GalacticHypernova GalacticHypernova added the status: review needed Request for review label Jul 6, 2024
@GalacticHypernova GalacticHypernova changed the title useTranslation errors when used inside a [Nitro](https://nitro.unjs.io) request hook useTranslation errors when used inside a Nitro request hook Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: review needed Request for review
Projects
None yet
Development

No branches or pull requests

1 participant