title: How should jsdom be configured with NuxtJS?
body: <p>I'm trying to use jQuery on NuxtJS. After following <a href="https://kaloraat.com/articles/how-to-use-jquery-in-nuxtjs" rel="nofollow noreferrer">this tutorial</a>, I obviously get errors saying that jQuery needs a window context. I installed jsdom and all of its dependencies and use it <a href="https://www.npmjs.com/package/jquery" rel="nofollow noreferrer">as it should be</a>, but every time I run <code>npm run dev</code> the following error always pops up:</p>
  
  <pre><code> ERROR  Failed to compile with 5 errors                                                      friendly-errors 14:13:40
  
  These dependencies were not found:                                                           friendly-errors 14:13:40
                                                                                               friendly-errors 14:13:40
  * child_process in ./node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js                   friendly-errors 14:13:40
  * fs in ./node_modules/jsdom/lib/jsdom/browser/resources/resource-loader.js, ./node_modules/jsdom/lib/jsdom/living/xhr-utils.js and 2 others
                                                                                               friendly-errors 14:13:40
  To install them, you can run: npm install --save child_process fs
  </code></pre>
  
  <p>Note those dependencies are indeed installed and up-to-date. Is this due to a conflict of sides on Nuxt? How would it be solved entirely or otherwise?</p>
  
  <p>I've also set up a plugin to always have the default window context through jsdom:</p>
  
  <p><strong>jsdom.js</strong></p>
  
  <pre><code>var jsdom = require("jsdom")
  const { JSDOM } = jsdom
  
  const { document } = new JSDOM("").window
  global.document = document
  </code></pre>