title: How to use npm jquery module?
body: <p>How should I <code>require</code>the <code>jquery</code> in <code>node</code> if I use it in multiple modules? Should I define it as a global or should I just use the <code>require('jquery</code>)` in every module I need it?</p>
  
  <p>I am getting an error when trying to use the package. </p>
  
  <pre><code>TypeError: Object function ( w ) {
              if ( !w.document ) {
                  throw new Error( "jQuery requires a window with a document" );
              }
              return factory( w );
          } has no method 'isArray'
  </code></pre>
  
  <p>It looks like a bug in the current release as it should not check if I am running it in a browser according to the official documentation. This issue is also mentioned in <a href="https://stackoverflow.com/questions/20832470/basic-error-when-using-jquery-with-nodejs">another post</a>. It works with version <code>1.8.3</code> as mentioned in one of the answers.</p>