title: Cannot find module 'react-dom/client' from 'node_modules/@testing-library/react/dist/pure.js'
body: <p>hope someone could help me here.</p>
  <p>while running npm test got following mistake</p>
  <pre><code>Cannot find module 'react-dom/client' from 'node_modules/@testing-library/react/dist/pure.js'
  Required stack:
  node_modules/@testing-library/react/dist/pure.js
  node_modules/@testing-library/react/dist/index.js
  </code></pre>
  <p>all neccesserry packages seem to be installed. I was trying to reinstall react-dom and didnot help. Below providing imports used in my test file:</p>
  <pre><code>import React from &quot;react&quot;;
  import { render, screen } from '@testing-library/react';
  import userEvent from '@testing-library/user-event';
  import '@testing-library/jest-dom';
  </code></pre>
  <p>was trying to solve this for few days...
  thank you in advance for any help</p>
  <p>P.S.Additionally providing my package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;fe&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@fontsource/roboto&quot;: &quot;^4.5.3&quot;,
      &quot;@material-ui/core&quot;: &quot;^4.12.3&quot;,
      &quot;@material-ui/icons&quot;: &quot;^4.11.2&quot;,
      &quot;@mui/icons-material&quot;: &quot;^5.5.0&quot;,
      &quot;@mui/material&quot;: &quot;5.5.3&quot;,
      &quot;@mui/styles&quot;: &quot;^5.5.1&quot;,
      &quot;@reduxjs/toolkit&quot;: &quot;^1.8.0&quot;,
      &quot;@testing-library/jest-dom&quot;: &quot;5.16.3&quot;,
      &quot;@testing-library/react&quot;: &quot;13.0.0&quot;,
      &quot;@testing-library/user-event&quot;: &quot;14.0.4&quot;,
      &quot;axios&quot;: &quot;^0.26.1&quot;,
      &quot;react&quot;: &quot;^17.0.2&quot;,
      &quot;react-dom&quot;: &quot;^17.0.2&quot;,
      &quot;react-hook-form&quot;: &quot;^7.28.1&quot;,
      &quot;react-redux&quot;: &quot;^7.2.6&quot;,
      &quot;react-router-dom&quot;: &quot;^6.2.2&quot;,
      &quot;react-scripts&quot;: &quot;5.0.0&quot;,
      &quot;redux&quot;: &quot;^4.1.2&quot;,
      &quot;styled-components&quot;: &quot;^5.3.5&quot;,
      &quot;web-vitals&quot;: &quot;^2.1.4&quot;,
      &quot;yup&quot;: &quot;^0.32.11&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;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;devDependencies&quot;: {
      &quot;@types/jest&quot;: &quot;^27.4.0&quot;,
      &quot;@types/node&quot;: &quot;^16.11.25&quot;,
      &quot;@types/react&quot;: &quot;^17.0.39&quot;,
      &quot;@types/react-dom&quot;: &quot;^17.0.11&quot;,
      &quot;@types/styled-components&quot;: &quot;^5.1.24&quot;,
      &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^5.12.0&quot;,
      &quot;@typescript-eslint/parser&quot;: &quot;^5.12.0&quot;,
      &quot;eslint&quot;: &quot;^8.9.0&quot;,
      &quot;eslint-config-airbnb&quot;: &quot;^19.0.4&quot;,
      &quot;eslint-config-prettier&quot;: &quot;^8.4.0&quot;,
      &quot;eslint-import-resolver-typescript&quot;: &quot;^2.5.0&quot;,
      &quot;eslint-plugin-import&quot;: &quot;^2.25.4&quot;,
      &quot;eslint-plugin-jsx-a11y&quot;: &quot;^6.5.1&quot;,
      &quot;eslint-plugin-prettier&quot;: &quot;^4.0.0&quot;,
      &quot;eslint-plugin-react&quot;: &quot;^7.28.0&quot;,
      &quot;eslint-plugin-react-hooks&quot;: &quot;^4.3.0&quot;,
      &quot;prettier&quot;: &quot;2.5.1&quot;,
      &quot;typescript&quot;: &quot;^4.5.5&quot;
    }
  }
  
  </code></pre>