Closed kleinpetr closed 2 weeks ago
When this module is enabled, something strange happens with the router, and the next
function disappears from the hook. After checking the source code, it seems that this module doesn’t use router
at all. I added a check in my module, and now everything seems to work fine. You can try version 1.21.4.
Honestly, I’m not entirely sure what was wrong, but it looks like I fixed it.
But actually, I had a different error, not with $cookies. Maybe this will help.
I checked it here:
https://stackblitz.com/edit/github-rbx1ec?file=app.vue
It seems to be working.
@s00d if you mean this:
this also happens with // '@dargmuesli/nuxt-cookie-control',
(disabled) I think: https://stackblitz.com/edit/github-rbx1ec-rhjgqp?file=nuxt.config.ts
You can continue this discussion here or over at https://github.com/s00d/nuxt-i18n-micro/issues/27, I'm just closing this here for now as I don't think it's related to this module. But we can reopen of course if there is anything in need to change on this module's end :raised_hands:
When this module is enabled, something strange happens with the router, and the
next
function disappears from the hook. After checking the source code, it seems that this module doesn’t userouter
at all. I added a check in my module, and now everything seems to work fine. You can try version 1.21.4.Honestly, I’m not entirely sure what was wrong, but it looks like I fixed it.
But actually, I had a different error, not with $cookies. Maybe this will help.
I checked it here:
https://stackblitz.com/edit/github-rbx1ec?file=app.vue
It seems to be working.
not sure what you mean by It seems to be working
but the pnmp typecheck
still not passing :thinking:
@s00d if you mean this:
this also happens with
// '@dargmuesli/nuxt-cookie-control',
(disabled) I think: https://stackblitz.com/edit/github-rbx1ec-rhjgqp?file=nuxt.config.ts
https://stackblitz.com/edit/github-rbx1ec-fjwgte?file=nuxt.config.ts Just add a pages folder; without it, the routing won’t be generated. I’ll try to fix this later.
Environment
Build Modules: -
Reproduction
https://stackblitz.com/github/kleinpetr/nuxt-cookies-i18n
run
pnpm typecheck
Describe the bug
Once I use i18n micro module https://nuxt.com/modules/nuxt-i18n-micro I am getting a typecheck error under the
nuxtApp().$cookies
as you can see in the reproduction'nuxtApp.$cookies' is of type 'unknown'
Additional context
No response
Logs