__vite-browser-external:node:async_hooks:3 Uncaught Error: Module "node:async_hooks" has been extern
vite-browser-external:node:async_hooks:3 Uncaught Error: Module "node:async_hooks" has been externalized for browser compatibility. Cannot access "node:async_hooks.AsyncLocalStorage" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
at Object.get (vite-browser-external:node:async_hooks:3:11)
at http.js:71:53
Here's my code looks like:
1 Reply
I think I solved it by putting "use server" inside
getSession
I didn't know every nested function call has to have that even though outer functions have it already.