title: How do I resolve `Missing shims for Node.js built-ins` in an electron rollup app?
body: <p>I'm trying to create a sqlite3 db using knex from inside an electron app built with rollup.</p>
  <pre><code>import knex from 'knex';
  import 'sqlite3';
  
  const database = knex({
      client: 'sqlite3',
      connection: {
          filename: './games.sqlite'
      },
      useNullAsDefault: true
  });
  
  database.schema.hasTable('games').then(exists =&gt; {
      if (!exists) {
          return database.schema.createTable('games', t =&gt; {
              t.increments('id').primary();
              t.string('name', 100);
          });
      }
  });
  
  export default database;
  </code></pre>
  <p>As soon as this code is run I see the following warnings:</p>
  <pre><code>(!) Missing shims for Node.js built-ins
  Creating a browser bundle that depends on 'util', 'events', 'stream', 'assert', 'timers', 'url', 'path', 'os' and 'buffer'. You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills
  LiveReload enabled
  (!) Missing global variable names
  Use output.globals to specify browser global variable names corresponding to external modules
  util (guessing 'util$6')
  events (guessing 'require$$0$1')
  stream (guessing 'require$$1')
  assert (guessing 'assert')
  timers (guessing 'timers_1')
  url (guessing 'url')
  fs (guessing 'fs')
  path (guessing 'path$1')
  child_process (guessing 'require$$0$2')
  os (guessing 'os')
  buffer (guessing 'buffer')
  </code></pre>
  <p>Instaling the suggested <a href="https://github.com/ionic-team/rollup-plugin-node-polyfills" rel="nofollow noreferrer">rollup-plugin-node-polyfills</a> and adding it in my rollup.config.js plugins list didn't seem to change anything.</p>