[1.2.2] Type error with Expo client plugin
Hey y'all, I'm getting this huge type error when I try to create the auth client on an Expo app. Here is my auth client code and I'm using the version 1.2.2 of better-auth and the latest version of expo-secure-store (14.0.1):
Did anyone get this issue before?

25 Replies
can you share your tsconfig?
im getting a similar error. Only happens when i bump to 1.2.2
@acme/tsconfig/base.json
tsconfig for expo

I have a monorepo so this is the tsconfig for the Expo app:
And this is the extended base config:
Hey @zenbb , sorry to ping you directly but is there any progress on your part? I still get the same error so I was wondering if you've figured out what is wrong.
Nah nothing on my end. Reverted back to 1.1.12 for now
Any progress from your guys ends?
I added this code block as a temporary workaround to beat the type error for now
are you on latest version (1.2.4)? please check both
better-auth
and @better-auth/expo
now on 1.2.5 having similar type errors:
If you’re incase using better fetch as a direct dependency, update it to latest
But I’ll take a look
Nope, these are the only two packages declared in my
package.json
:
But I do see different versions of better-fetch in my bun.lock
yeah it's probably a better fetch version mismatch
I couldn't exactly reproduce the type issue in my end if I'm latest version of both /expo and the main better-auth pkg
try removing node_modules and re-installing incase
Tried that, still have this issue
It could be a bun issue, lemme try npm or yarn
@Aziz any updates?
I can't reproduce it in my end. If both the expo and the main pacakge are on 1.2.5 and you don't have
better-fetch
with a differnt version making conflicts, it should work properly.better-fetch version looks ok
hmm
are you on latest?
if you can send me a POC would be happy to take a look :))
@bekacru latest, monorepo & bun. Let me check that later, I have a deadline to hit with something else first.. Appreciate your help!
What is the expected better-fetch version?
1.1.18
No type errors with [email protected] and an override for @better-fetch/[email protected]
Errors from [email protected] with @better-fetch/[email protected]
Types of property 'token' are incompatible. Related to feat: support async bearer token retrieval introduced in 1.1.18?
The override is working fine by the way
can you check if
1.2.6-beta.3
version fixes it?It does, thanks!🤘🏻 What caused the problem?
@bekacru
I think the expo plugin didn't have the latest version of better fetch
@bekacru im still seeing that better auth 1.2.5 has better fetch 1.1.17 version, which is causing the authClient to be untyped
nvm it was because of the expo plugin i had it as a dep in one of the monorepo packages