Next.js Discord

Discord Forum

middleware runtime

Unanswered
Texas leafcutting ant posted this in #help-forum
Open in Discord
Texas leafcutting antOP
Is it possible to run the middleware in Node and not Edge Runtime? Struggling with logging

5 Replies

did you mean Vercel? if so you cannot. self-hosted or local.
it’s almost same as Cloudflare Worker so Miniflare could work depending on ur issues
@Texas leafcutting ant Is it possible to run the middleware in Node and not Edge Runtime? Struggling with logging
European sprat
No it's not possible to change the runtime for middleware. What is the issue with logging you have?
Texas leafcutting antOP
@European sprat Pino doesn't support edge. I have found a sort of work around, but none of my mixins are applied, so its half a solution right now.

Why does middleware run in Edge?
European sprat
Pino works but it works as if it's being run in the browser. Not sure about the mixins