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

Prerender appears to not work with Cloudflare Template #74

Open
ytsruh opened this issue Jan 25, 2025 · 0 comments
Open

Prerender appears to not work with Cloudflare Template #74

ytsruh opened this issue Jan 25, 2025 · 0 comments

Comments

@ytsruh
Copy link

ytsruh commented Jan 25, 2025

Hi all,

I was testing out the Cloudflare template and it appears to not allow prerendering of pages.

My react-router.config.ts file is here:
export default { // Config options... // Server-side render by default, to enable SPA mode set this to false ssr: true, // Prerender selected routes prerender: ["/", "/about"], } satisfies Config;

And the console error when running build is here:

[react-router] Cannot convert undefined or null to object at Function.values (<anonymous>) at groupRoutesByParentId2 (/Users/chrishurst/Github/webiliti/client/node_modules/@react-router/dev/dist/vite.js:2717:10) at createPrerenderRoutes (/Users/chrishurst/Github/webiliti/client/node_modules/@react-router/dev/dist/vite.js:2728:76) at handlePrerender (/Users/chrishurst/Github/webiliti/client/node_modules/@react-router/dev/dist/vite.js:2544:16) at Object.handler (/Users/chrishurst/Github/webiliti/client/node_modules/@react-router/dev/dist/vite.js:2066:13) at async Promise.all (index 0) at PluginDriver.hookParallel (file:///Users/chrishurst/Github/webiliti/client/node_modules/rollup/dist/es/shared/node-entry.js:20868:9) at file:///Users/chrishurst/Github/webiliti/client/node_modules/rollup/dist/es/shared/node-entry.js:21911:13 at catchUnfinishedHookActions (file:///Users/chrishurst/Github/webiliti/client/node_modules/rollup/dist/es/shared/node-entry.js:21286:16) at Module.build (file:///Users/chrishurst/Github/webiliti/client/node_modules/vite/dist/node/chunks/dep-CHZK6zbr.js:65607:16) { code: 'PLUGIN_ERROR', plugin: 'react-router', hook: 'writeBundle' } error: script "build" exited with code 1

Has anybody seen this issue or any idea what it might be?

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

1 participant