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/i18n + sidease/nuxt-auth wipes out all types from the config file #2915

Closed
TheDutchCoder opened this issue Apr 16, 2024 · 4 comments
Closed

Comments

@TheDutchCoder
Copy link

TheDutchCoder commented Apr 16, 2024

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: npm@10.2.3
  • Builder: -
  • User Config: devtools, auth, modules, runtimeConfig
  • Runtime Modules: @sidebase/nuxt-auth@0.7.1, @nuxtjs/i18n@8.3.0
  • 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: sidebase/nuxt-auth#737

Additional context

No response

Logs

No response

@TheDutchCoder
Copy link
Author

TheDutchCoder commented Apr 16, 2024

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

@BobbieGoede
Copy link
Collaborator

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 sidebase/nuxt-auth#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.

@TheDutchCoder
Copy link
Author

Thanks Bobbie I appreciate it!

@BobbieGoede
Copy link
Collaborator

Closing this issue as sidebase/nuxt-auth#738 has been merged and included in https://github.com/sidebase/nuxt-auth/releases/tag/0.8.0-alpha.1!

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