title: Window is undefined error, when loading node_module package in a component
body: <p>I am trying to use <code>pickr</code> package ( a color picker library) in my <code>nuxt.js</code> app , at import time it is providing error called <strong>window is undefined</strong></p>
  <p>here is code:</p>
  <pre><code>
  &lt;script&gt;
  import Pickr from '@simonwep/pickr/dist/pickr.min.js';
  
  let pickr;
  
  export default {
    name: &quot;ColorPicker&quot;,
    mounted(){
      pickr = Pickr.create({
            el: '.test-picker',
            theme: 'classic',
            swatches: [
                'rgba(244, 67, 54, 1)',
                'rgba(233, 30, 99, 0.95)',
            ],
    
        });
    }
  }
  &lt;/script&gt;
  </code></pre>
  <h3>tried approaches</h3>
  <ul>
  <li>i made <code>pickr</code> package as a nuxt plugin added it to <code>nuxt.config.js</code> with <code>mode:client</code></li>
  <li>i made <code>pickr</code> package as a nuxt plugin added it to <code>nuxt.config.js</code> with <code>ssr:false</code></li>
  </ul>
  <p>but it did not work </p>