-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Remix tutorial returns error on first run #8654
Comments
Found the problem: Remix forces a version of react-router and yarn doesn't properly deduplicate it, leading to react-admin not properly detecting that it runs inside a Remix' router. The solution is to force a {
// ...
"resolutions": {
"react-router": "6.8.1",
"react-router-dom": "6.8.1"
}
} I'll update the tutorial accordingly. |
NextJS also gives the exact same error when following the tutorial on appRouter,
https://marmelab.com/react-admin/NextJs.html#nextjs-with-app-router |
@antennix can you also add if you are using yarn or npm, and the version? |
@slax57
|
Same error for me following Next.js getting started. I'm using App Router btw. |
It seems I can't reproduce the issue by following Remix tutorial V1 and V2.
node -v : 20.0.0 |
I'm also seeing this error (using npm, with nextjs App Router). I have a build error that i think might be related and is preventing me from deploying my code. Does anyone have any pointers?
The contents of my app/admin/page.tsx is as follows:
|
@benjamindell Try moving the Admin component into a new file ex:
I had the same build issue and this resolved it |
Thanks, that worked! |
We've updated the nextjs tutorial in #9131, where we encourage the solution above. |
Problem
Following the Remix Tutorial, after adding the two routes (index and splat) then running
yarn dev
and browsing to the served page (http://localhost:3000
), I get an errorSo I couldn't finish the step called Using React-Admin As The Root Application
The text was updated successfully, but these errors were encountered: