question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

question about history/createBrowserHistory warning

See original GitHub issue

After upgrading react-scripts version 0.9.5 to 3.0.1, there are several warnings

Warning: Please use require("history").createMemoryHistory instead of require("history/createMemoryHistory"). Support for the latter will be removed in the next major release. Warning: Please use require("history").PathUtils instead of require("history/PathUtils"). Support for the latter will be removed in the next major release. Warning: Please use require("history").createBrowserHistory instead of require("history/createBrowserHistory"). Support for the latter will be removed in the next major release. Warning: Please use require("history").createHashHistory instead of require("history/createHashHistory"). Support for the latter will be removed in the next major release.

The error is from react-error-overlay/lib/index.js:1375

react-scripts@^3.0.1 – react-dev-utils “^9.0.1” – react-error-overlay “^5.1.6”

Can you please suggest anything to help resolve these warnings? warning 2 warning

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
TOPSinfocommented, Jul 11, 2019

The issue was because of the react-router-dom@4.1.1 which used older version of history package. Updating the react-router-dom resolved the issue. Thanks for your help.

0reactions
bugzpoddercommented, Jul 11, 2019

Please provide a full complete repro that demonstrates this error

Read more comments on GitHub >

github_iconTop Results From Across the Web

question about history/createBrowserHistory warning #680
After upgrading history version 4.7.2 to 4.9.0, we cannot use history/createBrowserHistory. 4.7.2 --> OK. import createBrowserHistory from ...
Read more >
React require("history").createBrowserHistory` instead of ...
it says: Warning: Please use `require("history").createBrowserHistory` instead of `require( ...
Read more >
History API - MDN Web Docs - Mozilla
Chrome Edge Firefox History Full support. Chrome1. Toggle history Full support. Edge12. Toggle history Full sup... back Full support. Chrome1. Toggle history Full support. Edge12....
Read more >
Testing the React Router useNavigate Hook ... - LogRocket Blog
First, I centralize all access to the history object into a single export from one file located at src/history/index.ts : import { ...
Read more >
reactjs/react-router - Gitter
How can I set version of history manually or how can I solve this issue, ... project I have this issue: "Can't resolve...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found