N
Nuxt8mo ago
Gal

TS18046:  $i18n  is of type  unknown (Nuxt 3.8 => 3.11.2)

IDE is giving me error "TS18046:  $i18n  is of type  unknown " when I use below code inside middleware: const { $i18n } = useNuxtApp(); const locale = $i18n.locale.value; on nuxt 3.8 i had no IDE error any idea why?
1 Reply
Joey
Joey7mo ago
Maybe write it like this?
useNuxtApp().$i18n.locale.value
useNuxtApp().$i18n.locale.value
Want results from more Discord servers?
Add your server