Next.js Discord

Discord Forum

Disable Edge runtime

Answered
ᵗʰᵉ Nexus posted this in #help-forum
Open in Discord
I want to disable edge function to use nodejs packages in middleware, Can i do it?
Answered by joulev
it's impossible, so no, you can't.
View full answer

5 Replies

Answer
@joulev it's impossible, so no, you can't.
so how can i use middlewares from other packages in next?
@ᵗʰᵉ Nexus so how can i use middlewares from other packages in next?
you have to use packages that can run in the edge runtime. so for example jsonwebtoken doesn't work, but jose works