You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We just had this issue in create-t3-app,It seems like the declared next-auth.d.ts is overriding the initial next-auth types instead of augmenting them.
We even tried declaring the the types from next-auth/core/types but doesn't seem to work still.
Note that this problem only occurs when we use path aliases.
How to reproduce ☕️
To Reproduce
Steps to reproduce the behavior:
npx create-t3-app@next
Select all packages
Set up path aliases like so
See src/pages/api/auth/[...nextauth].ts file
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
The text was updated successfully, but these errors were encountered:
AFAIK, TypeScript does not concern itself where you declare a Module Augmentation in your project, as long as the file is included in your tsconfig's includes array.
UPDATE:
Well, maybe it does, since you are setting basePath: "./" so you basically tell TS to resolve next-auth to the .d.ts file instead. 🤔
Question 💬
We just had this issue in
create-t3-app
,It seems like the declared next-auth.d.ts is overriding the initial next-auth types instead of augmenting them.We even tried declaring the the types from
next-auth/core/types
but doesn't seem to work still.Note that this problem only occurs when we use path aliases.
How to reproduce ☕️
To Reproduce
Steps to reproduce the behavior:
npx create-t3-app@next
src/pages/api/auth/[...nextauth].ts
fileContributing 🙌🏽
Yes, I am willing to help answer this question in a PR
The text was updated successfully, but these errors were encountered: