Error when trying to use React Router

Whenever I created a React App and install React Router, I usually get this error in the console
Here is the code below

import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter } from 'react-router-dom';
const root = ReactDOM.createRoot(document.getElementById('root'));
    <App />


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.