If you try to use `prisma proxy` in `middleware` i...
# prisma-data-platform
d
If you try to use
prisma proxy
in
middleware
in
nextjs
12.0.4 or higher version, you will get this error. Is there any reason to use
eval
in
prisma
?
a
Hello @DaeHee Lee, we are investigating. Are you deploying to Cloudflare Workers?
d
Hello @Alberto Perdomo, Thanks for reply! I am deploying an application that uses prisma(data proxy) in the middleware (edge function) of nextjs through vercel. This middleware is similar to cloudflare worker and does not support “Native Node.js APIs” and eval etc. Reference https://nextjs.org/docs/api-reference/edge-runtime
👍 1
a
It’s a known issue since Next.js 12.0.4 when deploying Next.js middlewares to Vecel Edge, because eval is banned. `eval`s are used to hide Node.js deps from bundlers like webpack. This was a requirement to make the data proxy work on edge envs and node. Vercel changed their requirements to ban `eval`s from 12.0.4. Next.js will error on build time, even though evals would not be reached at runtime. We’ll look into a solution. In the meantime you could try pinning a previous version, probably?
👍 1
d
Thanks for doing the research for me! I’ll let you use the old version! Could you please notify me when this issue is resolved?
Previous versions of nextjs had this problem, so it would be good to fix this problem as soon as possible.