How do you fix this error? error occurs when npm run build #12522
Unanswered
raheelhparekh
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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 'mongoose/dist/browser.umd.js' in './src/lib/dbConnect.ts'.
Import trace for requested module:
./src/lib/dbConnect.ts
./src/auth.ts
./src/middleware.ts
Beta Was this translation helpful? Give feedback.
All reactions