Importuj bez względu na to

import { withRouter } from 'react-router-dom';
Run time Terror