Deploy velite on cloudflare use NextJS and Velite use mdx with error [Code generation from strings disallowed for this context] #184
Replies: 1 comment 1 reply
-
Based on your description, is this a runtime error? Does this mean that you have Theoretically, if you build successfully and the generated files are accessible, the problem you mentioned will not occur, because it is no different from importing json data directly in the code. Based on your repository, I speculate that this problem may occur during MDX rendering execution |
Beta Was this translation helpful? Give feedback.
-
cloudflare use node edge
export const runtime = 'edge'
can read here https://developers.cloudflare.com/pages/framework-guides/nextjs/deploy-a-nextjs-site/
there is a limit related to it that not allow Code generation from strings disallowed for this context
read more here https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes#runtime-differences
as now I need to use 'use client' and wrapper with to make it work. Not sure if there a better way but in case you have same issue you can try it.
here is what I done https://github.com/alteropen-com/alteropen if you want to check
Beta Was this translation helpful? Give feedback.
All reactions