supertokens / supertokens-node

Node SDK for SuperTokens core
https://supertokens.com
Other
281 stars 72 forks source link

Build error in next.js when using `runtime = 'edge'` #745

Open porcellus opened 8 months ago

porcellus commented 8 months ago

This causes an error: Module not found: Can't resolve 'zlib' (same for querystring and crypto) during building and running in dev mode.

Reproduction: Using our nextjs example, add

export const runtime = 'edge';

to the user route https://github.com/supertokens/next.js/blob/canary/examples/with-supertokens/app/api/user/route.ts reproduces the issue.

Reported in: https://discordapp.com/channels/603466164219281420/1173443361550643250