Troubleshooting
Guidelines for contributing to the invite plugin documentation.
Export expireCookie doesn't exist in target module
If you see an error like:
./node_modules/.pnpm/better-invite@.../dist/hooks.js:2:1
Export expireCookie doesn't exist in target module
1 | import { createAuthMiddleware } from "better-auth/api";
> 2 | import { expireCookie } from "better-auth/cookies";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
The export expireCookie was not found in module .../better-auth/dist/cookies/index.mjsWhy this happens
The plugin relies on the expireCookie export, which was introduced in Better Auth v1.4.13.
If you're using an older version of Better Auth, this export won't be available, leading to the error.
(see PR #7363 in Better Auth)
Solution
Upgrade Better Auth to v1.4.13 or newer
npm install better-auth@latestHow is this guide?
Last updated on