title: withRouter' is not exported from 'react-router-dom
body: <p>After npm i --save react-router-dom and npm install --save with-router I tried to write</p>
  <pre><code>import {withRouter} from 'react-router';
  </code></pre>
  <p>But I Get this error
  Attempted import error: 'withRouter' is not exported from 'react-router'.</p>
  <pre><code>
  
  import React from 'react';
  import PropTypes from 'prop-types';
  import { Formik } from 'formik';
  import {
    Box,
    Button,
    Card,
    CardContent,
    CardHeader,
    Divider,
   } from '@material-ui/core';
  import { connect } from 'react-redux';
  import jsonGR from &quot;src/assets/data/greek.json&quot;;
  import jsonEN from &quot;src/assets/data/english.json&quot;;
  import { LAN_EN }  from 'src/actions/types';
  import CloudUploadIcon from '@material-ui/icons/CloudUpload';
  import AddIcon from '@material-ui/icons/Add';
  import axios from 'axios';
  import LinearProgress from '@material-ui/core/LinearProgress';
  import Typography from '@material-ui/core/Typography';
  import { withRouter } from 'react-router'
  
  class ProfileDetails extends React.Component {
  //code
  }
  };
    ProfileDetails.propTypes = {
      className: PropTypes.string
    };
  
  const mapStateToProps = state =&gt; {
    return { loginsession: state.loginsession,
      selectedlan: state.selectedlan };
  };
  
  export default withRouter(ProfileDetails);
  </code></pre>
  <p>File package.json with dependencies that I make npm install in the project and all  the necessary information. I can't understand where is the problem I try with many ways but no one worked</p>
  <pre><code>{
    &quot;name&quot;: &quot;react-material-dashboard&quot;,
    &quot;author&quot;: &quot;Apanay22&quot;,
    &quot;licence&quot;: &quot;MIT&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;private&quot;: false,
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start http-server &quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: &quot;react-app&quot;
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;dependencies&quot;: {
      &quot;@material-ui/core&quot;: &quot;^4.11.0&quot;,
      &quot;@material-ui/icons&quot;: &quot;^4.9.1&quot;,
      &quot;@material-ui/lab&quot;: &quot;^4.0.0-alpha.56&quot;,
      &quot;@material-ui/styles&quot;: &quot;^4.10.0&quot;,
      &quot;axios&quot;: &quot;^0.21.1&quot;,
      &quot;bcrypt&quot;: &quot;^5.0.0&quot;,
      &quot;chart.js&quot;: &quot;^2.9.3&quot;,
      &quot;clsx&quot;: &quot;^1.1.1&quot;,
      &quot;compress.js&quot;: &quot;^1.1.2&quot;,
      &quot;cors&quot;: &quot;^2.8.5&quot;,
      &quot;csv-parse&quot;: &quot;^4.15.1&quot;,
      &quot;express&quot;: &quot;^4.17.1&quot;,
      &quot;formik&quot;: &quot;^2.1.5&quot;,
      &quot;glob&quot;: &quot;^7.1.6&quot;,
      &quot;gulp&quot;: &quot;^4.0.2&quot;,
      &quot;history&quot;: &quot;^5.0.0&quot;,
      &quot;lodash&quot;: &quot;^4.17.19&quot;,
      &quot;material-ui-popup-state&quot;: &quot;^1.7.1&quot;,
      &quot;moment&quot;: &quot;^2.27.0&quot;,
      &quot;mui-datatables&quot;: &quot;^3.7.6&quot;,
      &quot;nprogress&quot;: &quot;^0.2.0&quot;,
      &quot;papaparse&quot;: &quot;^5.3.0&quot;,
      &quot;prop-types&quot;: &quot;^15.7.2&quot;,
      &quot;react&quot;: &quot;^16.13.1&quot;,
      &quot;react-chartjs-2&quot;: &quot;^2.10.0&quot;,
      &quot;react-csv-reader&quot;: &quot;^3.2.1&quot;,
      &quot;react-dom&quot;: &quot;^16.13.1&quot;,
      &quot;react-feather&quot;: &quot;^2.0.8&quot;,
      &quot;react-helmet&quot;: &quot;^6.1.0&quot;,
      &quot;react-hot-toast&quot;: &quot;^1.0.2&quot;,
      &quot;react-image-file-resizer&quot;: &quot;^0.4.2&quot;,
      &quot;react-navigation&quot;: &quot;^4.4.4&quot;,
      &quot;react-perfect-scrollbar&quot;: &quot;^1.5.8&quot;,
      &quot;react-redux&quot;: &quot;^7.2.2&quot;,
      &quot;react-router&quot;: &quot;^6.0.0-beta.0&quot;,
      &quot;react-router-dom&quot;: &quot;^6.0.0-beta.0&quot;,
      &quot;react-scripts&quot;: &quot;^3.4.1&quot;,
      &quot;react-toast-notifications&quot;: &quot;^2.4.0&quot;,
      &quot;react-toastify&quot;: &quot;^7.0.2&quot;,
      &quot;redux&quot;: &quot;^4.0.5&quot;,
      &quot;redux-thunk&quot;: &quot;^2.3.0&quot;,
      &quot;use-history&quot;: &quot;^1.4.1&quot;,
      &quot;uuid&quot;: &quot;^8.3.0&quot;,
      &quot;with-router&quot;: &quot;^1.0.1&quot;,
      &quot;yup&quot;: &quot;^0.29.3&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@types/react-router-dom&quot;: &quot;^5.1.7&quot;,
      &quot;concurrently&quot;: &quot;^5.3.0&quot;,
      &quot;eslint&quot;: &quot;^6.8.0&quot;,
      &quot;eslint-config-airbnb&quot;: &quot;^18.2.0&quot;,
      &quot;eslint-config-prettier&quot;: &quot;^6.11.0&quot;,
      &quot;eslint-plugin-import&quot;: &quot;^2.22.0&quot;,
      &quot;eslint-plugin-jsx-a11y&quot;: &quot;^6.3.1&quot;,
      &quot;eslint-plugin-prettier&quot;: &quot;^3.1.4&quot;,
      &quot;eslint-plugin-react&quot;: &quot;^7.20.3&quot;,
      &quot;eslint-plugin-react-hooks&quot;: &quot;^2.5.1&quot;,
      &quot;prettier&quot;: &quot;^1.19.1&quot;
    },
    &quot;proxy&quot;: &quot;http://localhost:9000&quot;
  }
  </code></pre>