Why not use Node.js Packages in MiddleWare? #34790
Answered
by
thibautsabot
CheaterScript
asked this question in
Help
-
Hi,I want import casbin in MiddleWare,but get error:
How to fix it? |
Beta Was this translation helpful? Give feedback.
Answered by
thibautsabot
Feb 25, 2022
Replies: 1 comment 2 replies
-
Hello. Middlewares are run by the Next.js Edge Runtime which is based on standard Web APIs. As stated by the documentation:
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
CheaterScript
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
Middlewares are run by the Next.js Edge Runtime which is based on standard Web APIs.
As stated by the documentation:
https://nextjs.org/docs/api-reference/edge-runtime#unsupported-apis