title: How to install jsdom in React Native
body: <p><strong>Steps to reproduce:</strong></p>
  
  <ol>
  <li><code>react-native init myproject</code>.</li>
  <li><code>cd myproject</code>.</li>
  <li><code>npm install jsdom</code>.</li>
  <li>In my <strong>App.js</strong>, I added <code>import jsdom from 'jsdom';</code>.</li>
  <li><code>react-native run-ios</code>.</li>
  </ol>
  
  <p><strong>Expected Output:</strong>
  App starts on the React native landing page.</p>
  
  <p><strong>Actual Output:</strong>
  Unable to resolve module <code>path</code> from <code>/Users/davidangulo/Desktop/mobile/myproject/node_modules/jsdom/lib/api.js</code>: Module <code>path</code> does not exist in the Haste module map</p>
  
  <p>According to their readme: (<a href="https://github.com/jsdom/jsdom" rel="nofollow noreferrer">https://github.com/jsdom/jsdom</a>)</p>
  
  <pre><code>const jsdom = require("jsdom");
  const { JSDOM } = jsdom;
  </code></pre>
  
  <p>That is how you initialize it but unfortunately, it doesn't work.</p>