Exported variable 'auth' has or is using name 'OrganizationOptions'
error:
Exported variable 'auth' has or is using name 'OrganizationOptions' from external module "/chao/react-hono-example/node_modules/better-auth/dist/plugins/organization/index" but cannot be named.ts(4023)
See releated issue on github (2d ago): https://github.com/better-auth/better-auth/issues/3493
I have upgraded to 1.3.2 but still have the same issue. Does anyone know a potential fix?
GitHub
Exported variable 'auth' has or is using name 'OrganizationOptions'...
Is this suited for github? Yes, this is suited for github To Reproduce error: Exported variable 'auth' has or is using name 'OrganizationOptions' from external module "/chao/re...
11 Replies
I also have the same issue in my monorepo. I use pnpm as my package manager.
Same issue as well
I have tried this and it works @Azzani @Michael Maust

My bad this loses the types of the server side organization api methods

Also same issue with monorepo with pnpm
I have the same issue with the admin plugin
Exported variable 'auth' has or is using name 'SessionWithImpersonatedBy' from external module .... but cannot be named.
Exported variable 'auth' has or is using name 'UserWithRole' from external module ... auth/dist/plugins/admin/index" but cannot be named.
@bekacru @Ping can you guys check this? Setting composite to false solves the issue but it ruins the monorepo type safety for sharing modules.
having the same issues as everyone here, and having to give up type safety would be awful. really wish there was a better solution.
@bekacru
if I pretend the problem doesn't exist maybe it won't hurt me 🙈
Add the following to your tsconfig file