The inferred type of 'authClient' cannot be named without a reference to '.pnpm/@better-fetch+fetch@
Encountering Error in Turbo Repo Project – Need Help Resolving It
Solution
This is a known issue (see better-auth issue #1391)
Your choices (if you don't want to tweak your tsconfig or wait until this is fixed upstream) are usually to install the inner types in the consuming package, or export your own types from your internal package and re-use it in the consumer. Neither are ideal, but I went with the second. For example,
hey folks, I am trying to upgrade the setup to V5 with a very basic auth file (I commented the code to test it out), TypeScript compiler is giving me some trouble: import NextAuth, { NextAuthConfig...