Astro Info
Astro v6.1.8
Node v22.21.1
System Linux (x64)
Package Manager pnpm
Output static
Adapter @astrojs/cloudflare
Integrations @astrojs/mdx
@astrojs/react
@astrojs/partytown
@vite-pwa/astro-integration
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When migrating an astro app from 5 to 6 in turborepo, it behaves in a strange way when using cloudflare adapter and workerd as prerender environment.
My astro app is located at apps/web
When the build command is run in apps/web directory, it builds the app as expected.
Example:
(from root)
cd apps/web
pnpm run build
Logs:
✓ built in 269ms
21:36:22 [build] Server built in 33.83s
21:36:22 [build] Complete!
But, when the build command is run by turbo, it exits without fully building the app (mostly when prerendering phase begins) and no error at all.
Example:
(from root)
turbo run build
Logs:
web:build:
21:28:31 [assets] Copying fonts (16 files)...
web:build: Using secrets defined in .env
web:build: 21:28:32 [vite] ✓ built in 9.50s
21:28:37 [WARN] [vite] src/pages/ssr-test/index.astro (25:18): "components" is not exported by "src/pages/ssr-test/_content.mdx", imported by "src/pages/ssr-test/index.astro".
web:build: Using secrets defined in .env
:sparkles: Parsed 2 valid header rules. (x2)
Tasks: 5 successful, 5 total
Cached: 2 cached, 5 total
Time: 41.713s
Observations:
Turbo terminates the process as soon as prerendering begins in workerd prerender environment, it does not terminate when prerenderEnvironment: 'node' is used in cloudflare adapter config.
I am not sure, but looks like when workerd environment is used, it does not block properly and turbo thinks execution is completed so terminates the process.
What's the expected result?
The app should build completely with workerd prerender environment when build command is run by turborepo.
Link to Minimal Reproducible Example
https://github.com/kumardeo/astro-repro-16396
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When migrating an astro app from 5 to 6 in turborepo, it behaves in a strange way when using
cloudflareadapter andworkerdas prerender environment.My astro app is located at
apps/webWhen the build command is run in apps/web directory, it builds the app as expected.
Example:
(from root)
cd apps/web
pnpm run build
Logs:
But, when the build command is run by turbo, it exits without fully building the app (mostly when prerendering phase begins) and no error at all.
Example:
(from root)
turbo run build
Logs:
Observations:
Turbo terminates the process as soon as prerendering begins in
workerdprerender environment, it does not terminate whenprerenderEnvironment: 'node'is used incloudflareadapter config.I am not sure, but looks like when
workerdenvironment is used, it does not block properly and turbo thinks execution is completed so terminates the process.What's the expected result?
The app should build completely with
workerdprerender environment when build command is run by turborepo.Link to Minimal Reproducible Example
https://github.com/kumardeo/astro-repro-16396
Participation