title: Module not found: Error: Can't resolve 'react-dom/client'
body: <p>I am using react with the following packages:</p>
  <pre><code>{
    &quot;name&quot;: &quot;demo&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@testing-library/jest-dom&quot;: &quot;^5.16.4&quot;,
      &quot;@testing-library/react&quot;: &quot;^13.0.1&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^13.5.0&quot;,
      &quot;h3-js&quot;: &quot;^3.7.2&quot;,
      &quot;leaflet&quot;: &quot;^1.7.1&quot;,
      &quot;react&quot;: &quot;^17.0.1&quot;,
      &quot;react-dom&quot;: &quot;^17.0.1&quot;,
      &quot;react-leaflet&quot;: &quot;3.0.2&quot;,
      &quot;react-scripts&quot;: &quot;5.0.1&quot;,
      &quot;web-vitals&quot;: &quot;^2.1.4&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&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;react-app/jest&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;
      ]
    }
  }
  </code></pre>
  <p>My <code>index.js</code> looks like the following:</p>
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom/client';
  import './index.css';
  import App from './App';
  import reportWebVitals from './reportWebVitals';
  
  const root = ReactDOM.createRoot(document.getElementById('root'));
  root.render(
    &lt;React.StrictMode&gt;
      &lt;App /&gt;
    &lt;/React.StrictMode&gt;
  );
  
  reportWebVitals();
  
  </code></pre>
  <p>My <code>App.js</code> is like the following:</p>
  <pre><code>import React from &quot;react&quot;;
  import { render } from &quot;react-dom&quot;;
  import LeafletMap from &quot;./Map&quot;;
  
  class App extends React.Component {
    state = { resolution: 8, kRing: 0 };
  
    constructor(props) {
      super(props);
      this.state = { resolution: 8, kRing: 0 };
    }
  
    render() {
      return (
        &lt;div&gt;
          &lt;LeafletMap
            resolution={this.state.resolution}
            kRing={this.state.kRing}
          /&gt;
          Resolution:
          &lt;input
            type=&quot;number&quot;
            min={0}
            max={15}
            onChange={this.onChangeResolution}
            defaultValue={8}
          /&gt;
          &lt;br /&gt;
          K Rings:
          &lt;input
            type=&quot;number&quot;
            min={0}
            max={100}
            onChange={this.onChangeKRings}
            defaultValue={0}
          /&gt;
        &lt;/div&gt;
      );
    }
  
    onChangeResolution = (e) =&gt; {
      this.setState({ resolution: Number.parseInt(e.target.value) });
    };
    onChangeKRings = (e) =&gt; {
      this.setState({ kRing: Number.parseInt(e.target.value) });
    };
  }
  
  export default App;
  
  </code></pre>
  <p>When I run my app with <code>npm run start</code> I get the following error:</p>
  <pre><code>Compiled with problems:X
  
  ERROR in ./src/index.js 5:0-40
  
  Module not found: Error: Can't resolve 'react-dom/client' in '/home/Desktop/Code/demo_app/src'
  </code></pre>
  <p>I reinstalled all packages and its also listed in <code>npm list</code>:</p>
  <pre><code>&gt;  npm list
  demo_app@0.1.0 /home/Desktop/Code/demo_app
  ├── @testing-library/jest-dom@5.16.4
  ├── @testing-library/react@13.0.1
  ├── @testing-library/user-event@13.5.0
  ├── h3-js@3.7.2
  ├── leaflet@1.7.1
  ├── react-dom@17.0.1
  ├── react-leaflet@3.0.2
  ├── react-scripts@5.0.1
  ├── react@17.0.1
  └── web-vitals@2.1.4
  </code></pre>
  <p>Any suggestions why I have problems compiling my application?</p>