Error: Failed to publish your Function. Got error: Uncaught ReferenceError: _page1 is not defined

I am building my website with Astro. I have wordpress setup as a headless cms within the site. when I run the build in my localhost, it works just fine, but in cloudflare, this error shows up. any ideas? this is my astro config
import cloudflare from '@astrojs/cloudflare'
import react from '@astrojs/react'
import tailwind from '@astrojs/tailwind'
import { defineConfig, passthroughImageService } from 'astro/config'

// https://astro.build/config
export default defineConfig({
output: 'hybrid',
adapter: cloudflare({
imageService: 'passthrough',
}),
image: {
service: passthroughImageService(),
},
integrations: [react(), tailwind()],
trailingSlash: 'always',
})
import cloudflare from '@astrojs/cloudflare'
import react from '@astrojs/react'
import tailwind from '@astrojs/tailwind'
import { defineConfig, passthroughImageService } from 'astro/config'

// https://astro.build/config
export default defineConfig({
output: 'hybrid',
adapter: cloudflare({
imageService: 'passthrough',
}),
image: {
service: passthroughImageService(),
},
integrations: [react(), tailwind()],
trailingSlash: 'always',
})
2 Replies
Dynamore
DynamoreOP8mo ago
this is the log from cloudflare. I've tried deleting all other pages and tried different things with the config but no success still
Dynamore
DynamoreOP8mo ago
Figured out the issue. has to do with node version. I was using 18.17.1. There seems to be a compat issue that requires minimum node v18.18.0. Although there was still another issue with Astro SSG on cloudflare. which seems to be an issue from Astro side.
Error: Failed to publish your Function. Got error: Uncaught TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
at renderers.mjs:63:443
Error: Failed to publish your Function. Got error: Uncaught TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
at renderers.mjs:63:443
will be waiting for a fix from Astro for now
Want results from more Discord servers?
Add your server