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
Invalid hook call on login page #810
Comments
Just confirming, are you using Also, what's the version of your |
@dziraf My mistake, I'm using |
I will try to reproduce this error tomorrow. I DID get this error before, but only when developing Two extra questions:
|
First off, thanks for looking into this issue.
To provide a bit more context, I'm using a custom dashboard but I don't think it's related to this as the hook errors show up even when I'm using the vanilla dashboard. I'm starting to assume that this doesn't have to do with react/react-dom version mismatch. |
I tried to reproduce on a clean project but I'm not experiencing this problem there. Are you able to set up a simple repository where this error occurs for you so that I can clone it? Also, we've released |
I ended up fixing this problem. These are the steps I took:
|
After trying everything that has been mentioned about this error, it continues to persist... I don't know what to do... |
This error disappears when I use admin-bro@3.2.5.... |
Happened to me on buildAuthenticatedRouter: |
Fixed by using same react/react-dom versions as in admin-bro dependencies: |
@yarikpwnzer Well I tried with the exact same version but it doesn't work either. It only works if I use admin-bro@3.2.5. |
What is the difference between |
I was just playing with the packages (deleting and re-downloading them and changing their versions) and it just started working. Weird... |
@kodesak I opened yarn.lock and checked versions of react/react-dom and what I noticed that there were two entries: one was added by me (17.0.2) and another was dependency of admin-bro (16.13.1). It worked also without adding it to my dependencies, but since I'm using eslint I got errors in the code. |
|
At this point, I am probably going to abandon this package because of this error that is stopping me every time... |
I get this issue when i have React version |
Coming from the error message:
I think the first probable reason |
Ok so i just wrote |
To fix this issue, I switched to "resolutions": {
"adminjs/react": "17.0.2",
"adminjs/react-dom": "17.0.2"
}, |
I'm stucked in this issue. I'm working on a project on two pc. On the first it always have been worked and on my new pc i have this issue even if i have same package.json file with same versions on both pc, i don't understand why... Edit : it works fine with @yarikpwnzer 's solution, thanks man ! |
This worked for me, after a whole day of trying to figure out the issue. Thanks a bunch |
i ran into this issue again. was working fine until the latest update. however once i updated latest versions of adminjs @adminjs/express @adminjs/mongoose this error started coming. i resolved it by installing react and react-dom into my backend. |
This worked for me just fine after many tries as it auto-updates all dependencies ! |
Issue is not fixed. After latest update, react needs to be manually installed so that adminjs can run. |
Describe the bug
I'm getting the following error:
Installed libraries and their versions
To Reproduce
Steps to reproduce the behavior:
buildAuthenticatedRouter
to create AdminBro router./admin
Additional context
There's a closed issue about this matter, but I was not able to resolve this problem after removing node_modules or by adding react & react-dom as dependencies.
The text was updated successfully, but these errors were encountered: