Skip to content

routeDiscovery is undefined even explicitly specified #24

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

Open
yf-yang opened this issue May 9, 2025 · 4 comments
Open

routeDiscovery is undefined even explicitly specified #24

yf-yang opened this issue May 9, 2025 · 4 comments

Comments

@yf-yang
Copy link

yf-yang commented May 9, 2025

Reproduction: https://github.com/yf-yang/rsbuild-react-router-bug (This is just a copy of the default-template, with all packages updated to latest)

To reproduce:

pnpm i
pnpm dev
// open localhost:3000 and got an internal error

error message: TypeError: Cannot read properties of undefined (reading 'manifestPath')

That's because RR7.6 introduced a new config routeDiscovery. However, I cannot easily figure out what's the package that triggers the issue. Simply bumping RR to 7.6 and rsbuild/core to latest (1.3.18) cannot trigger the error.

react-router.config.ts:

import type { Config } from "@react-router/dev/config";

export default {
  // Config options...
  // Server-side render by default, to enable SPA mode set this to `false`
  ssr: true,
  routeDiscovery: { mode: "initial" },
} satisfies Config;
@dionfananie
Copy link

dionfananie commented May 10, 2025

somehow you can revert the version of RR to 7.1.3 and it works. and using vite version 5

@yf-yang
Copy link
Author

yf-yang commented May 15, 2025

@dionfananie Thx, actually I am staying with 7.5.3, but it would be definitely good if the bug got fixed :)

@anggihseptiawan
Copy link

Hey @dionfananie, I change the RR version to be 7.1.3 and I still got the same error, and I try to clone yours https://github.com/dionfananie/react-router-rsbuild, also got the same error

@yf-yang
Copy link
Author

yf-yang commented May 22, 2025

@ScriptedAlchemy @chenjiahan Sorry to bother, would you mind taking a look somehow?

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

3 participants