i18n
i18n copied to clipboard
nuxt/i18n + sidease/nuxt-auth wipes out all types from the config file
Environment
- Operating System: Linux
- Node Version: v18.18.0
- Nuxt Version: 3.11.2
- CLI Version: 3.11.1
- Nitro Version: 2.9.6
- Package Manager: [email protected]
- Builder: -
- User Config: devtools, auth, modules, runtimeConfig
- Runtime Modules: @sidebase/[email protected], @nuxtjs/[email protected]
- Build Modules: -
Reproduction
https://stackblitz.com/edit/github-js6xqk?file=composables%2FuseThing.ts
Describe the bug
Bear with me for this one, I'm not sure which module is to blame here, but the combo of these two modules removes all type definitions from the runtime config.
You can see, in the composable, that .foo
is no longer typed when both modules are enabled.
When I disable either of these modules, types generate correctly.
Bug report on sidebase/nuxt-auth: https://github.com/sidebase/nuxt-auth/issues/737
Additional context
No response
Logs
No response
Downgrading i18n to 8.1.1 fixes the issue, so I'm fairly sure the problem is with this module. Moving to 8.2.0 and this issue starts appearing, so something broke in that release
It's unclear why downgrading to an older version works, I haven't tested this or looked into that. It seems like the types break due the nuxt-auth module not augmenting the runtime config types in the same way as we do, I've opened https://github.com/sidebase/nuxt-auth/pull/738 that will resolve this on their end.
We can keep this issue open in case other users experience the same thing and close it when the PR has been merged and released.
Thanks Bobbie I appreciate it!
Closing this issue as https://github.com/sidebase/nuxt-auth/pull/738 has been merged and included in https://github.com/sidebase/nuxt-auth/releases/tag/0.8.0-alpha.1!