import {browserHistory} from 'react-router'銆俠ut throw the error that browserHistory does not exist..and Cannot read property 'location' of undefined
There is no browserHistory export in v4. If you're using v2/3, then you just need to install the correct version (npm install react-router@3). If you are using v4, you should read this section of the migration guide.
Also you can refer 'A Simple React Router v4 Tutorial'
https://medium.com/@pshrmn/a-simple-react-router-v4-tutorial-7f23ff27adf
Where you need to install 'npm install react-router-dom --save' in your project directory and
then you can include following
import { BrowserRouter, Link, Route } from 'react-router-dom';
Example :

Is working fine for me.
Most helpful comment
There is no
browserHistoryexport in v4. If you're using v2/3, then you just need to install the correct version (npm install react-router@3). If you are using v4, you should read this section of the migration guide.