withastro/astro

Server islands respond with 404 when deployed to vercel

Opened this issue · 2 comments

Astro Info

Astro                    v5.1.1
Node                     v22.10.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  @astrojs/vercel
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Sever islands have stopped working on vercel and the _server-islands route only responds with a 404 message. They still work fine in dev mode. I have deployed the provided minimal example to vercel here. Please note that the unused.astro page is only there to work around another issue that exists with server-islands at the moment which is being tracked here #12744

I believe the last version of Astro that didn't have this issue was 5.0.5, so this might have been introduced by the refactor in #12597. I have done a little bit of digging, but haven't been able to pin-point the error, but it does look like the server island endpoint is missing from the manifest.

I might be able to look into this more in the coming days

What's the expected result?

Server islands should work when deploying to vercel

Link to Minimal Reproducible Example

https://stackblitz.com/~/github.com/Trombach/withastro-astro-4hurafak

Participation

  • I am willing to submit a pull request for this issue.

Hapenning to me as well!!

I tried downgrading to 5.0.5 and <Serverisland server:defer /> was working on Vercel but only without ISR on. When I enabled ISR it stopped working with the HTTP/404.

I used the same src code with only difference being isr: { /* */ }

export default defineConfig({
  output: "server",
  adapter: vercel({
    isr: {

       bypassToken: "***",
       exclude: [ "/some/path", "/some/path2"]

    }
  }),
});