#AstroDB + API route + Vercel error

4 messages · Page 1 of 1 (latest)

cloud bramble
#

Hi, I am trying to use AstroDB and deploy an astro app to vercel but i get a warning when building the app

[<@&1055234544183287879>/vercel] The module "/vercel/path0/node_modules/libsql/.targets" inside the file "/vercel/path0/node_modules/libsql/index.js" couldn't be resolved. This may not be a problem, but it's worth checking.
which results in a 500 when trying to call the api route

10:51:35 [ERROR] Error: Failed to connect to database: /vercel/path0/.astro/content.db
at new Database (/var/task/vercel/path0/node_modules/libsql/index.js:72:17)

the api route is a simple post route (working locally and with astro studio without issues),
the output is set to hybrid (tried server too),
using astro/vercel serverless adapter,
latest version of all packages.

Any idea about what should i do here?

plush gate
#

@cloud bramble did you get a resolution to this? I'm getting the same error in the same setup.

cloud bramble
#

unfortunately not, but i haven't had to time to investigate further as it's a side project and it's been a bit rough at work so i had to pause this :/ i think it's a problem with folder location (and long lived files), i am not a vercel expert so i am sure there's some answer out there. If i find a solution i'll post it here!

plush gate
#

Thanks, looks like someone else had the same issue, and resolved it by creating a new API token. #1217860671639785472 message
That hasn't work for me, so unsure how to resolve this. Thanks for your help.