Hey all,
I’m attempting to put my Svelte Kit project into production with Vercel as it’s host. Everything works as expected locally but when attempting to use it on Vercel I get the following error:
Error: Dynamic require of "crypto" is not supported
at file:///var/task/index.js:29:9
at node_modules/.pnpm/mongodb@4.6.0/node_modules/mongodb/lib/operations/add_user.js (file:///var/task/index.js:15364:19)
I’m using v4.6.0 or higher of the mongodb node driver. I believe it was re-written using Typescript. I’d hope that it is using imports rather than requires.
Any ideas on a potential solution?