-
-
Notifications
You must be signed in to change notification settings - Fork 52
Build fails using server islands and static output mode #498
Comments
Not sure what the implications of this is, but i have found the following.
switching the buildSetting to server on the vercel adapter makes the error go away, but i am not sure about other implications. |
I know one implication (because it was the reason I discovered this). I wanted to cache a server island using cache headers. That did not work because the Server output causes TLDR; You can't cache server islands. That is why it is not an option to just use server output. |
Hi @JannikWempe I got the issue, I verified that the output is as expected when changing the adapter options, small fix that should do. Can you also check if this is the fix you were looking for? |
Hey @AirBorne04 thanks for working on a fix. I was able to build the project locally with |
Hi @JannikWempe I did a little more digging and hit some issues but also came to a possible easy solution. When we set Therefore I would think that the adapter always should build in "server" config, I tried settings this but for some (currently unknown to me) reason that does not result in the correct build (call to _server_island fails) while doing the same with But what I found that setting I think that should generally be the way to go, since this is more of a Astro project concern how the files are build, not what the layout for the runtime should be. |
Adding With this, using It is inconsistent though, that some adapters behave differently, for example:
|
I agree that they should behave the same. In my opinion they should be considered |
Thanks a ton, @AirBorne04 👍🏼 I think this issue can be closed. Finding a consistent, minimal confusing way to handle inconsistencies seems to be a separate thing. (Feel free to reopen if you disagree.) |
Astro Info
Describe the Bug
Rendering a server island (adding
server:defer
to any component), using adaptervercel
(can also reproduce it withsst
) andoutput: "static"
results in this error:[NoAdapterInstalledServerIslands]
It works fine with the
netlify
adapter though.This is a discussion about the issue on Discord with @louisescher.
What's the expected result?
The build should work using server islands and a static output mode. (It does using the
netlify
adapter.)Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-s2hf8p8k
Participation
The text was updated successfully, but these errors were encountered: