#@astrojs/vercel/edge causes builds to fail when using mongodb

1 messages · Page 1 of 1 (latest)

uneven river
#

This may not be appropriate for this channel, but I wanted to share here in case someone else has seen this and fixed it.

It seems that the Astro boilerplate template for Vercel can't be bulit once any reference to mongodb is added.

I've posted about this here:
https://github.com/orgs/vercel/discussions/3541

The loose steps to repro are:

  1. init a project with the astro starter
  2. install and reference any part of the mongo lib (I've only tested w/ MongoClient)
  3. try to build in vercel - fails

Like I said, this seems like more of a vercel issue than an Astro issue, but wanted to share to see if anyone has encountered this before.

GitHub

Summary Astro projects seem to fail any build where there's any reference to the mongodb npm package in code. Builds succeed if the package is in the package.json but fail as soon as any code r...

uneven river
#

Build fails when referencing mongodb

sly mortarBOT
#
No-one around right now?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

uneven river
#

@astrojs/vercel/edge causes builds to fail when using mongodb

#

Update: I found that this only happens when using the vercel() adapter in @astrojs/vercel/edge and not when I use @astrojs/vercel/serverless