-
-
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
require("history") console warnings #3138
Comments
The core has been fixed fir these warnings (originating from an update in the So I'm closing this as we can't reproduce the problem. In the future, please use the issue template and give us a way to reproduce the bug. |
I lost a whole day trying to NOT reproduce the problem in different environments. I'm really curious which is the environment that you used, @fzaninotto |
Well, if you do provide a way to reproduce the bug, it helps. I'm running the simple demo locally and I have no error. But I saw that the error occurs in the react-admin CodeSandbox (that you should have linked form the issue template), so I'm reopening this issue. |
This seems to be caused by the This is the commit that fixed it: |
About the And part of package.json for a demo: {
"dependencies": {
"react": "^16.8.6",
"react-admin": "^2.8.5",
"react-dom": "^16.8.6",
"react-router": "^5.0.0",
"react-scripts": "2.1.8"
},
} |
+1 for warnings in console |
I confirm that I get same warrning too, even though I'm using newest react-admin and react-router in my project "react-router": "5.0.0", And these errors only occured when I've added react-admin Still hoping for a fix, because it's annoyng to ignore those warrning |
I've been trying to reproduce the warnings within the examples, with no success. Even using tag 2.8.5, reinstalling all packages and rebuilding everything, I can't reproduce the warnings. But I do reproduce them by simply creating a new react application depending on react-admin 2.8.5... I'm really scratching my head over this one. I have an idea for a fix, but since I can't test it, I can't move forward. P.S.: I understand that you're annoyed by these warnings, but you should understand that they don't come from react-admin. It's ReactTraining/history who added them in a minor release. Feel free to voice your opinion regarding console errors in minor versions in their repository. |
@RandalTeng @blamze Installing react-router on your project isn't going to fix the warnings, since both What did fix the warnings was instaling Of course this isn't a proper fix, but it does seem to confirm my thesis... |
If using yarn, you may try the resolutions. Can't remember the equivalent in npm though |
Resolutions don't work on our monorepo (using yarn 1.15.2, which is the latest version available). But I've managed to reproduce the problem by editing the |
It's always cool. Thank you very much. And this issue should to be closed? |
Sorry to ask, but I'd need to clear this up: is this fixed now? I mean, are the errors in the console gone? |
We just merged the PR. This will be available in the next release |
Perfect. Thank you for your work on this! |
i solved the problem just by installing react router and react router dom of version 4.3.0 |
this fixed it for me |
The require in <Main/> wasn't importing the correct components. There was a warning caused by ReactRouter, that was fixed by relaxing the version. marmelab/react-admin#3138
The require in <Main/> wasn't importing the correct components. There was a warning caused by ReactRouter, that was fixed by relaxing the version. marmelab/react-admin#3138
Hi! I'm using react-admin version 2.8.5, and I'm getting these warnings in the console. What could be wrong? I did a yarn upgrade also, and the warnings are still there.
Warning: Please use
require("history").createBrowserHistoryinstead of
require("history/createBrowserHistory"). Support for the latter will be removed in the next major release.
Warning: Please use
require("history").createHashHistoryinstead of
require("history/createHashHistory"). Support for the latter will be removed in the next major release.
Warning: Please use
require("history").createMemoryHistoryinstead of
require("history/createMemoryHistory"). Support for the latter will be removed in the next major release.
Warning: Please use
require("history").PathUtilsinstead of
require("history/PathUtils"). Support for the latter will be removed in the next major release.
The text was updated successfully, but these errors were encountered: