title: How do I use HTTP urls with Node ESM module loader?
body: <p>I have the following <code>import mongo from &quot;mongodb&quot;;</code> I would like to avoid using npm and instead use unpkg.com like this <code>import mongo from &quot;https://unpkg.com/mongodb&quot;;</code>. However, when I run I get...</p>
  <pre><code>...@penguin:~/...$ node --harmony test.mjs node:internal/process/esm_loader:74
      internalBinding('errors').triggerUncaughtException(
                                ^
  
  Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. Received protocol 'https:'
      at new NodeError (node:internal/errors:328:5)
      at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:825:11)
      at Loader.resolve (node:internal/modules/esm/loader:86:40)
      at Loader.getModuleJob (node:internal/modules/esm/loader:230:28)
      at ModuleWrap.&lt;anonymous&gt; (node:internal/modules/esm/module_job:56:40)
      at link (node:internal/modules/esm/module_job:55:36) {
    code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
  }
  </code></pre>
  <p>Because it uses the term <em>default</em> module loader I was wondering if there was an alternative ESM loader I could use.</p>