get-convex / get-convex/better-auth

Random TS errors for `createAuth` and `authClient`

Open
#116 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
764
Forks
126
PR merge metrics
No merged PRs in 30d

Description

Sorry if this was reported already but I came across 2 stubborn and possibly false positive TS errors while setting up better auth with convex.

Basically if you follow this official setup guide, at step 5 and 6, when you define `createAuth` and the `authClient` TS throws the following errors.

```
The inferred type of 'authClient' cannot be named without a reference to '.pnpm/jose@5.10.0/node_modules/jose'. This is likely not portable. A type annotation is necessary.ts(2742)
```

```
The inferred type of 'createAuth' cannot be named without a reference to '.pnpm/jose@5.10.0/node_modules/jose'. This is likely not portable. A type annotation is necessary.ts(2742)
```

To reproduce, just follow the steps [here](https://convex-better-auth.netlify.app/framework-guides/next).

Version: `0.8.6` and also `0.8.8` (latest)
Better Auth version is what is recommended: 1.3.8

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.