newest create-t3-app (next 15) , drizzle (postgresql) and authjs v5 beta middleware problem

everything is normal before i add middleware.ts

here's the errors:
[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
[auth][cause]: Error: The edge runtime does not support Node.js 'perf_hooks' module.
[auth][error] SessionTokenError: Read more at https://errors.authjs.dev#sessiontokenerror
[auth][cause]: Error: The edge runtime does not support Node.js 'perf_hooks' module.
Screenshot_2024-11-03-10-25-04_1366x768.png
Screenshot_2024-11-03-10-25-23_1366x768.png
Screenshot_2024-11-03-10-26-19_1366x768.png
Solution
my bad, sorry guys im stupid.

found the solution:
https://authjs.dev/getting-started/migrating-to-v5#edge-compatibility

add this in auth config:
session: { strategy: "jwt" },
image.png
Authentication for the Web
Was this page helpful?