diff --git a/packages/core/src/async_hooks/index.ts b/packages/core/src/async_hooks/index.ts index 54e4b49c16..487baa011b 100644 --- a/packages/core/src/async_hooks/index.ts +++ b/packages/core/src/async_hooks/index.ts @@ -16,6 +16,8 @@ const AsyncLocalStoragePromise: Promise = import( if ("AsyncLocalStorage" in globalThis) { return (globalThis as any).AsyncLocalStorage; } + const errorStack = err.stack; + console.warn(errorStack); console.warn( "[better-auth] Warning: AsyncLocalStorage is not available in this environment. Some features may not work as expected.", );