Drizzle NextJs Middleware
Hello,
I'm currently using NextJs middlewares to protect my application. In my middleware, I have a query running to check if the sessionToken is valid. But whenever I visit the protected page I get the following error.
Does anyone know how I can fix this? If needed, I can provide some code examples.
3 Replies
Nextjs middleware run in a different environment, edge compatible, not node.
Your code is probably calling some node functionality. This is not related to Drizzle
This is what I have in my middleware.
The driver you're using might not be edge compatible then