-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Astro experimental assets does not work with Node.js SSR adapter #7974
Comments
I have this problem too. I solved it locally by upgrading from node 18 to node 20. @Princesseuh any update on this? |
The repro you shared works for me on both Node 18 and Node 20. Does it still happen for you on the latest versions of Astro? |
This still does not work on Astro v3 and @astrojs/node 6. I'm using Node 19. |
This issue is still reproducing in Astro v3.1.1 with Node 18 |
I believe the only remaining issue related to this is this one: #8735 that is specific to Windows. Otherwise, recent patches should've fixed everything, so I'll close this issue |
What version of
astro
are you using?2.10.1
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
npm
What operating system are you using?
Windows 10, Linux (Debian)
What browser are you using?
Chrome, Firefox
Describe the Bug
While using
astro:assets
with the Node SSR adapter, optimized images don't work properly on not prerendered pages when running vianode ./dist/server/entry.mjs
, on both Squoosh and sharp image services. This doesn't seem to be the case when executingnpm run preview
ornpm run dev
, however.When requesting the images directly, the only error printed is a 404 "Not found" error in the client.
Stackblitz seems to deliver corrupt images with "unexpected end of JPEG file", but this may be a different issue altogether, so I'm linking the repository to a minimal code example directly.
CodeSandbox seems to be the only environment where it does seem to work for some reason.
What's the expected result?
The optimized images should be delivered correctly from the server on non-prerendered pages.
Link to Minimal Reproducible Example
https://github.com/YonicDev/astro-bug-assets-node
Participation
The text was updated successfully, but these errors were encountered: