Closed LilaRest closed 1 week ago
I managed to silent the error by the following dirty patch adding to my ./src/middleware.ts
file:
export const config = {
unstable_allowDynamic: [
"/node_modules/**",
],
};
Now the app builds correctly and is deployed by Cloudflare Pages, but the entire website returns an "Error: 500", here is a screenshot of the logs:
After further investigation, I realize that both errors are the same. They refer to the usage of an evaluation code somewhere in the ZenStack enhancer. https://nextjs.org/docs/messages/edge-dynamic-code-evaluation
I tried to find any of these in the ZenStack code using the VSCode search bar, but I haven't found anything yet.
I tried to run the enhanced ZenStack client in an API route and get an even more explicit error: EvalError: Code generation from strings disallowed for this context
.
There is definitely a dynamic code evaluation made somewhere in ZenStack runtime or one of its dependencies. Again, using the raw Prisma client works perfectly.
Happy to pay some $$ to prioritize this issue :)
Fixed in 2.5.0
Description and expected behavior Hey there! I'm currently implement ZenStack in a NextJS project hosted on Cloudflare Pages (edge-runtime) so my entire application is set with:
Development server works well, but as soon as I attempt a build, I obtain the error shown on the below screenshot. I tried to precisely follow the instructions from that documentation page, but the error persists.
Does anyone has an idea of what might be happening here?
Screenshots
Environment (please complete the following information):