#Astro DB missing app token even when ASTRO_STUDIO_APP_TOKEN is defined in .env file

1 messages · Page 1 of 1 (latest)

willow cliff
#

Do you have any astro:db dependency in your middleware.js? If so, this is exactly the issue I'm facing on Cloudflare too (and it seems a couple of others as well based on the below I saw on Github).

molten tundra
#

i was looking all over the internet and found nothing.Do you know anything of getting error on deploy as well? I was getting this one error of my port being in use already? which i don't fully understand either...

20:18:51 [build] ✓ Completed in 2.75s.

 building client (vite) 
20:18:51 [ERROR] [vite] WebSocket server error: Port is already in use
20:18:51 [vite] Re-optimizing dependencies because vite config has changed```
willow cliff
#

I do see that error on Cloudflare build too but it doesn't seem to be impacting anything. When I remove the db dependency from middleware everything works. You're using Lucia, doesn't that mean you're talking to some database at the backend to manage authentication? So it might be the same issue as what I outlined - the db dependency is breaking the build.

cedar yew
#

Have you defined ASTRO_STUDIO_APP_TOKEN in Vercel?

molten tundra