culture_59893
DTDrizzle Team
•Created by culture_59893 on 8/22/2023 in #help
Nextjs edge middleware: Cannot import node:crypto
Vercel Github discussion with other users having the same problem using Drizzle: https://github.com/vercel/next.js/discussions/47314
Hello, it seems that Drizzle is attempting to import node/crypto and failing inside nextjs edge middleware functions.
However, using the crypto global in edge functions/middleware is supported 👍
https://github.com/vercel/examples/blob/main/edge-middleware/crypto/middleware.ts
https://vercel.com/templates/next.js/edge-functions-crypto
Is it possible to add support for nextjs edge middleware or are there any available workarounds?
5 replies