sidebase / nuxt-session

Nuxt session middleware to get a persistent session per app user, e.g., to store data across multiple requests. The nuxt session module provides the useSession() composable out of the box and sets up API endpoints to interact with your session to make working with sessions feel like a breeze.
https://sidebase.io/nuxt-session/
MIT License
189 stars 19 forks source link

Upgraded to Nuxt3 RC 13 #20

Closed zoey-kaiser closed 1 year ago

zoey-kaiser commented 1 year ago

Closes #18

zoey-kaiser commented 1 year ago

This PR and https://github.com/sidebase/nuxt-auth/pull/14 are both throwing the same error since upgrading to Nuxt3 RC 13. I did some research into the issue, but could only find answers about react or other frameworks. @valiafetisov do you have any initial ideas where I could start? Thank you!

Error: src/module.ts(112,1): error TS2742: The inferred type of 'default' cannot be named without a reference to
'@nuxt/kit/node_modules/@nuxt/schema'. This is likely not portable. A type annotation is necessary.
zoey-kaiser commented 1 year ago

This PR and sidebase/nuxt-auth#14 are both throwing the same error since upgrading to Nuxt3 RC 13. I did some research into the issue, but could only find answers about react or other frameworks. @valiafetisov do you have any initial ideas where I could start? Thank you!

The issue was that I forgot to upgrade our other nuxt dependencies!

zoey-kaiser commented 1 year ago

The biggest issue I am currently facing with this PR and https://github.com/sidebase/nuxt-auth/pull/14 is that I am getting a new type error that the module config is incorrectly typed. @valiafetisov and I assume that many of the new type issues are coming due to an increase in harshity in the tsconfig, that may have been a result of the nuxt update to RC 13. The error message is:

Error: playground/nuxt.config.ts(5,13): error TS2322: Type 'NuxtModule<ModuleOptions>' is not assignable to type 'string | NuxtModule<ModuleOptions> | [(string | NuxtModule<ModuleOptions> | undefined)?, ({ [x: string]: any; } | undefined)?] | undefined'.

Along with this nuxt-auth and nuxt-session have many new type errors that are now coming to light. I at times am unsure of the best way to deal with them, as they types seem to be infered (IMO through other packages) but are not added correctly when building. Could this be another issue with the virtual nitro imports @BracketJohn?

BracketJohn commented 1 year ago

closed in favor of #43