BA
Better Auth•3mo ago
r1me

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
Azzani
Azzani•3mo ago
I also have the same issue in my monorepo. I use pnpm as my package manager.
Michael Maust
Michael Maust•3mo ago
Same issue as well
r1me
r1meOP•3mo ago
I have tried this and it works @Azzani @Michael Maust
No description
r1me
r1meOP•3mo ago
My bad this loses the types of the server side organization api methods
No description
radek1313
radek1313•3mo ago
Also same issue with monorepo with pnpm
reddevil777
reddevil777•3mo ago
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.
Azzani
Azzani•3mo ago
@bekacru @Ping can you guys check this? Setting composite to false solves the issue but it ruins the monorepo type safety for sharing modules.
Daniel
Daniel•3mo ago
having the same issues as everyone here, and having to give up type safety would be awful. really wish there was a better solution.
nikatune
nikatune•3mo ago
@bekacru
Daniel
Daniel•3mo ago
if I pretend the problem doesn't exist maybe it won't hurt me 🙈
Amazin' Sly
Amazin' Sly•3mo ago
Add the following to your tsconfig file
"declaration": false,
"declarationMap": false,
"declaration": false,
"declarationMap": false,

Did you find this page helpful?