ERR_REQUIRE_ESM on better-auth 1.2.10 (not 1.2.11+) on Vercel Deployment
Hi !
First, thanks a lot for all the efforts put in the library, it's really a time saver for me 🙂
I'm having exactly the same error as here (https://github.com/better-auth/better-auth/issues/3260) when deploying the project on Vercel (it doesn't trigger on a local build). I enforced a 1.2.10 version of better-auth to fix the problem but it still pops up. It does also happen when trying to bootstrap a blank Payload CMS project with npx create-payload-app@latest.
I posted a GitHub Issue here with more information : https://github.com/better-auth/better-auth/issues/3369
If anyone can help me it would be greatly appreciated :)))
Many thanks,
GitHub
ERR_REQUIRE_ESM when importing better-auth@1.2.11+ due to jose bein...
Is this suited for github? Yes, this is suited for github To Reproduce Create a standard NestJS project using CommonJS (TypeScript, Node 20.x) Install better-auth version 1.2.11 or later Run the pr...
GitHub
ERR_REQUIRE_ESM on better-auth 1.2.10 (not 1.2.11+) on Vercel Deplo...
Is this suited for github? Yes, this is suited for github To Reproduce Create a standard NextJS project with create-next-app Install better-auth version 1.2.10 Run the project and import/use better...
1 Reply
Make sure to update the latest version of node to make sure to esm only works