HuXn-WebDev / Auth.js-v5-Complete-Course

All the source code for my Auth.js v5 Complete Course 🥂
https://www.youtube.com/watch?v=soprdrmpO3M
49 stars 3 forks source link

project fails to build #1

Open romanpoudel opened 2 months ago

romanpoudel commented 2 months ago

This is the error: Creating an optimized production build ... Failed to compile.

./node_modules\mongoose\dist\browser.umd.js 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

Import trace for requested module: ./node_modules\mongoose\dist\browser.umd.js ./lib\db.ts ./auth.ts ./middleware.ts

Build failed because of webpack errors

romanpoudel commented 2 months ago

I tried removing middleware.ts file and it works fine.