-
-
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
Cannot build SSR with CloudFlare adapter and MDX #6535
Comments
I have a reduced example: https://stackblitz.com/edit/withastro-astro-w1bj5x?file=src%2Fpages%2Fblog%2F[...slug].astro . MDX is not necessary to recreate, just using cloudflare and content collections. |
Thanks @matthewp will try to deploy without content collections for now and wait for the fix! |
Fixed by #6537, will be released shortly. |
@matthewp @carlosesquivelroisenvit we use the latest version of astro (3.5.5) and we have the same problem :-/ Switched from Netlify to Cloudflare and we are unable to build the project anymore. deps: "dependencies": {
"@astrojs/check": "^0.3.1",
"@astrojs/cloudflare": "^7.7.1",
"@astrojs/node": "^6.0.4",
"@astrojs/tailwind": "^5.0.2",
"@flyo/nitro-astro": "^1.0.4",
"astro": "^3.5.5",
"autoprefixer": "^10.4.16",
"cssnano": "^6.0.1",
"glider-js": "^1.7.8",
"sass": "^1.69.5",
"tailwindcss": "^3.3.5",
"typescript": "^5.2.2"
} Errors:
Astro.config import { loadEnv } from "vite";
import { defineConfig } from "astro/config";
import flyoNitroIntegration from "@flyo/nitro-astro";
import tailwind from "@astrojs/tailwind";
import cloudflare from "@astrojs/cloudflare";
const {
FLYO_ACCESS_TOKEN,
FLYO_LIVE_EDIT
} = loadEnv(process.env.NODE_ENV, process.cwd() + "/src/", "");
// https://astro.build/config
export default defineConfig({
site: "https://foobar.com",
compressHTML: true,
output: "server",
integrations: [
flyoNitroIntegration({
....
}),
tailwind()
],
adapter: cloudflare()
}); any idea how to fix that? |
What version of
astro
are you using?2.1.2
Are you using an SSR adapter? If so, which one?
Cloudflare
What package manager are you using?
npm
What operating system are you using?
Windows
What browser are you using?
Edge
Describe the Bug
The project fails to build if using the Cloudflare server adapter and having MDX or MD files in the
/src/content
folder. Theastro dev
command works correctly butastro build
fails with the message below. Switching to Netlify adapter, for example, removes the error and builds successfully.I have build a simple reproduction, cloning the Blogs sample and the error persists.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-tlztcd
Participation
The text was updated successfully, but these errors were encountered: