Skip to content
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

Uncaught DOMException: Failed to execute 'pushState' on 'History' #6533

Closed
ezrogha opened this issue Jan 6, 2019 · 1 comment
Closed

Uncaught DOMException: Failed to execute 'pushState' on 'History' #6533

ezrogha opened this issue Jan 6, 2019 · 1 comment

Comments

@ezrogha
Copy link

ezrogha commented Jan 6, 2019

I am relatively new to react-router-dom and have enjoyed using it in react apps. Currently, am trying to add react to my web page, but have failed to make a route because react-router-dom keeps producing this error.

react-router-dom

I followed this demo https://codepen.io/schafeld/pen/yzvZPj

@timdorr
Copy link
Member

timdorr commented Jan 7, 2019

You cannot use a BrowserRouter with a file:// path. It's a security thing. Either set up a small web server or use HashRouter.

@timdorr timdorr closed this as completed Jan 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants