title: Getting error when try to use React Router v6: Attempted import error: 'Action' is not exported from 'history'
body: <p>I have created a new react application using</p>
  <pre><code>npx create-react-app app-name
  </code></pre>
  <p>Then I changed my directory to that app folder and then ran the following command.</p>
  <pre><code>npm install react-router@next react-router-dom@next
  </code></pre>
  <p>Then I ran my application and it worked fine. Then I changed the default code and used Routes, Route, etc. Here is APP code</p>
  <pre><code>import React from 'react';
  import {BrowserRouter as Router, Routes, Route} from &quot;react-router-dom&quot;
  
  function App() {
    return (
      &lt;Router&gt;
        &lt;Routes&gt;
          &lt;Route path=&quot;/&quot; element={&lt;Home /&gt;} /&gt;
        &lt;/Routes&gt;
      &lt;/Router&gt;
    );
  }
  
  function Home()
  {
    return &lt;div&gt;
          &lt;h1&gt;Home&lt;/h1&gt;
      &lt;/div&gt;
  }
  
  export default App;
  </code></pre>
  <p><strong>I get the error:</strong></p>
  <pre><code>Attempted import error: 'Action' is not exported from 'history'.
  </code></pre>
  <p>Path of the error is:</p>
  <pre><code>./node_modules/react-router/index.js
  </code></pre>
  <p>Any Idea what is wrong with it?</p>