-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Bug]: v7 regression in a monorepo since prerelease #12390
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
Comments
Any progress on this one? |
@xalechez, I had a similar error in a monorepo and I solved it by updating my vite config to set the root to the directory the config is in.
|
I've merged a fix in #13472 which will be out in the next release. If the fix in |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Uh oh!
There was an error while loading. Please reload this page.
What version of React Router are you using?
7.0.1
Steps to Reproduce
apps/test-app
withvite.config.ts
andreact-router.config.ts
specifyingappDirectory
react-router build -c apps/test-app/vite.config.ts
from the root of the repositoryRR7 config:
Expected Behavior
I would like to be able to run my application from the root of my monorepo by specifying the location of
vite.config.ts
like I did when I tested a pre-release versionOR
I would like to be able to run my application from
apps/test-app
with thepackage.json
resolved from the root of my monorepoActual Behavior
Currently it works in two modes:
react-router
fails withError: Could not find a root route module in the app directory as "app/root.tsx"
package.json
This problem can be solved just by adding a package.json to the app folder, but we opted in to single version policy per monorepo as it becomes quite tedious to maintain dependencies for multiple applications at the same time. React Router 7 pre-release satisfied our needs, but as vite config and RR config are now separated, it looks like this functionality is no longer supported
The text was updated successfully, but these errors were encountered: