-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongodb
and cannot be bundled with worker presets
#949
Comments
Thanks for making the reproduction. I have a fix for the particular first issue we encounter. However, the We might finally require a preset of configurations or special packed distro of MongoDB. Are you trying to deploy it on a worker target? |
noExternals: true
leads to build errormongodb
and cannot be bundled with worker presets
Yes indeed, but I think they are optional, at least according to
Sounds reasonable indeed.
Yup, CF workers 🙈 |
Just out of curiosity:
What was needed to make Vue bundle friendly? |
Also couple of indirect mocks enabled by unenv/nodeless to reduce size for workers: https://github.com/unjs/unenv/blob/main/src/presets/nodeless.ts |
After further research I wonder if Because of TCP/IP you might need Further read: https://developers.cloudflare.com/workers/learning/integrations/databases/ Maybe also worth checking e.g. https://github.com/denodrivers/mongo |
I'm having the same issue on "vercel-edge" |
@manniL I don't think mongodb will work, as of the missing raw support for TCP/UDP that you mentioned. Even the official Mongo documentation only references the Realm SDK for Workers. |
It works with externals tracer indeed (still lots of duplicate deps as you know 🙈). It would probably worth to make it better anyway at least for Node.js target. (if possible)
Sound like a nice idea for docs! Maybe in Deployment>Overview>Workers and mention workers limits + possible current worker targets? (deno, cloudflare, vercel edge, netlify edge -- they all share similar limits and specs) |
I hit the same problem here. Does it mean we can't use mongo db with their server less approach ? What is the recommandation here please :s |
Serverless is fine ✅ |
I changed for supabase personnally |
@TylorMayfield Did you manage to solve it with vercel-edge preset? |
Having the same issue, setting NITRO_PRESET to remove edge workers (ex. setting it to just vercel instead of vercel-edge) creates the bundle but I would really like to use the edge workers. Any workarounds? I see using Realm SDK was suggested. |
Some engines such as For mongoDB and incompatible databases, you often need an HTTP gateway. Check this example with cloudflare+atlas/realm: https://www.mongodb.com/developer/products/atlas/cloudflare-worker-rest-api/ |
Environment
Darwin
v18.13.0
pnpm@7.27.0
Reproduction
https://github.com/manniL/rm-nitro-externals-mongodb
pnpm i
pnpm build
Describe the bug
When building, the following error occurs:
Additional context
Similar to #947
Logs
No response
The text was updated successfully, but these errors were encountered: