You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use gray-matter in Next.js edge runtime. But it seems that the library is not compatible with edge runtime. I am getting the following error:
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
Learn More: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation
The error was caused by importing 'gray-matter/index.js' in './lib/api.ts'.
for me it is only a warning currently with my quasar / vue / vite setup:
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Cannot call a namespace ('matter')
Cannot call a namespace ('matter')
but this warning also mentioned if i set the eval:false option..
I am trying to use gray-matter in Next.js edge runtime. But it seems that the library is not compatible with edge runtime. I am getting the following error:
I get the error even when disabling eval:
Is there any way to make this library edge friendly? Does anybody know any alternative that can be used with edge?
The text was updated successfully, but these errors were encountered: