exited with code: null and signal: SIGTERM

I am trying to fix this issue since like couple days now and still havent found the solution works good locally but when trying to deploy using cloudflare it just gives error, using NextJS btw 21:29:50.953 ▲ Compiler server unexpectedly exited with code: null and signal: SIGTERM 21:29:55.434 ▲ Failed to compile. 21:29:55.435 ▲ ./node_modules/mongodb/lib/client-side-encryption/crypto_callbacks.js:4:15 21:29:55.435 ▲ Module not found: Can't resolve 'crypto' 21:29:55.435 ▲
21:29:55.435 ▲ https://nextjs.org/docs/messages/module-not-found
12 Replies
Cyb3r-Jak3
Cyb3r-Jak36mo ago
Seems like the mongodb package isn't going to work as it requires crypto which doesn't exist with the Cloudflare run time. You can try using node_compat to see if that helps
KacperM
KacperM6mo ago
hm didnt tried that thanks ill check nope, doesnt work Module not found: Can't resolve 'child_process' it requires much more looks like big cloudflare issue
Cyb3r-Jak3
Cyb3r-Jak36mo ago
Seems like the mongodb package isn't supported in Cloudflare then. Cloudflare doesn't have support for child_process
KacperM
KacperM6mo ago
well same happens with mysql so cloudflare doesnt support any databases
Cyb3r-Jak3
Cyb3r-Jak36mo ago
I mean they do
KacperM
KacperM6mo ago
which one? i mean i tried most popular ones and they dont seem to work
Cyb3r-Jak3
Cyb3r-Jak36mo ago
Cloudflare Docs
Database Integrations (beta) · Cloudflare Workers docs
Connect to a supported third-party database (such as Supabase, Turso and more) directly from the Cloudflare dashboard.
KacperM
KacperM6mo ago
hm you know if thre is away to host fullstack app on cloudflare?
Cyb3r-Jak3
Cyb3r-Jak36mo ago
Also keep in mind that packages have to have added support for TCP connections from Cloudflare because the standard TCP isn't supported. Cloudflare's only hosting is Pages and Workers
KacperM
KacperM6mo ago
uhm
Cyb3r-Jak3
Cyb3r-Jak36mo ago
Thought does seem like your project won't be able to use Cloudflare
KacperM
KacperM6mo ago
ye it sucks i mean most projects wont be able to use one since they just use mysql well lets hope they will allow mysql one day
Want results from more Discord servers?
Add your server