Skip to content
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

Support Hybrid Rendering #4

Open
EthanShoeDev opened this issue Jan 2, 2025 · 2 comments
Open

Support Hybrid Rendering #4

EthanShoeDev opened this issue Jan 2, 2025 · 2 comments

Comments

@EthanShoeDev
Copy link

Astro recently changed the config so that output: 'static' and output: 'hybrid' now mean the same thing.
https://astro.build/blog/astro-5/#simplified-prerendering

Trying to build astro 5.1.2 with output: 'static' causes this error:

$ npx sst deploy --stage production
SST 3.4.50  ready!

➜  App:        astro-sst-route-order
   Stage:      production

~  Deploy


> [email protected] build /home/ethan/temp/astro-sst-route-order
> astro build

16:46:12 [content] Syncing content
16:46:12 [content] Astro config changed
16:46:12 [content] Clearing content store
16:46:12 [content] Synced content
16:46:12 [types] Generated 19ms
16:46:12 [build] output: "server"
16:46:12 [build] directory: /home/ethan/temp/astro-sst-route-order/dist/
16:46:12 [build] adapter: astro-sst
16:46:12 [build] Collecting build info...
16:46:12 [build] ✓ Completed in 25ms.
16:46:12 [build] Building server entrypoints...
 ELIFECYCLE  Command failed with exit code 1.
16:46:12 [ERROR] [config] The adapter astro-sst does not currently support the feature "sharp". Your project may not build correctly.
16:46:12 [ERROR] [vite] x Build failed in 41ms
[vite:build-import-analysis] [plugin vite:build-import-analysis] @astrojs-ssr-adapter (1:14): Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
file: @astrojs-ssr-adapter:1:14

1: export * from undefined;
                 ^

  Location:
    @astrojs-ssr-adapter:1:14
  Stack trace:
    at getRollupError (file:///home/ethan/temp/astro-sst-route-order/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
    at Object.error (file:///home/ethan/temp/astro-sst-route-order/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:20689:20)
    at Object.transform (file:///home/ethan/temp/astro-sst-route-order/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-BJP6rrE_.js:50088:14)
|  Error       MyWeb sst:aws:Astro → MyWebBuild sst:Run
|  command exited with code 1

✕  Failed    
   MyWeb sst:aws:Astro → MyWebBuild sst:Run
   command exited with code 1

There was some prior work getting hybrid rendering to work on this PR:
sst/sst#3363

@EthanShoeDev
Copy link
Author

EthanShoeDev commented Jan 2, 2025

Didn't notice PR that fixes this issue: #2
Edit: Maybe not, a recent commit on that PR removes support for hybrid rendering...

@san4d
Copy link

san4d commented Jan 9, 2025

Didn't notice PR that fixes this issue: #2 Edit: Maybe not, a recent commit on that PR removes support for hybrid rendering...

I was cleaning up types as part of that MR, which is trying to support Astro v5. Removing the hybrid rending variant was based off of this documentation from Astro:
https://docs.astro.build/en/guides/upgrade-to/v5/#removed-hybrid-rendering-mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants