Next Auth Deploy Issues with Netlify and NextJS

Hi @hillary

I’m getting a similar issue to the above. I’m not using mongodb but when building the site I get the module not found issue.

I think it may be the way the /opt/build/repo/node_modules/typeorm/platform is being dealt with in the build process. If I explicitly add mongodb as a dependency then the build fails on the next database package (e.g. msql, mysql2, oracledb etc.) in a similar way to this post

Most recent failed build:

I found this issue on the next-auth repo. I’m also not sure if this is an issue with the change to webpack 5 as I was getting successful builds with webpack 4 and haven’t changed anything recently.

Let me know if you need anything else

Thanks