Astro site not generating static pages when using vercel adapter

89 views Asked by At

I have a vercel deployment that is set on "hybrid" that build correctly, no errors.

But if I inspect the static assets, there is only index.html, any of my other pages are being generated. The pages that are not static work, but any static pages ends in a 404 from Vercel, not even my 404 page is generated.

This is my astro config:

import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import svelte from "@astrojs/svelte";

import vercel from "@astrojs/vercel/serverless";

// https://astro.build/config
export default defineConfig({
  integrations: [tailwind(), svelte()],
  output: "hybrid",
  adapter: vercel(),
  vite: {
    optimizeDeps: {
      exclude: ["oslo"],
    },
  },
});

The build log even mentions the right paths to render:

 prerendering static routes 
14:52:40 ▶ src/pages/404.astro
14:52:40   └─ /404.html (+1ms)
14:52:40 ▶ src/pages/alicia/invitados.astro
14:52:40   └─ /alicia/invitados/index.html (+0ms)
14:52:40 ▶ src/pages/alicia/login.astro
14:52:40   └─ /alicia/login/index.html (+0ms)
14:52:40 λ src/pages/api/login.ts
14:52:40   └─ /api/login14:52:40 [WARN] [router] No API Route handler exists for the method "GET" for the route "/api/login".
Found handlers: "POST"

But if I navigate to any of those, I get a 404 from Vercel

0

There are 0 answers