title: (node:9511) ExperimentalWarning: The ESM module loader is experimental
body: <p>I am trying to use ES6 on server side. I a have separated endpoint from server file:</p>
  <p>archive.js:</p>
  <pre><code>import { Router } from &quot;express&quot;;
  const router = Router();
  
  router.get(&quot;/&quot;, async (req, res) =&gt; { &quot;some code&quot;});
  
  export default router;
  </code></pre>
  <p>when i want to import it to my server file like this:</p>
  <pre><code>import archive from &quot;./endpoints/archive.js&quot;;
  app.use(&quot;/archive&quot;, archive);
  </code></pre>
  <p>it gives me an error:</p>
  <p>(node:9565) ExperimentalWarning: The ESM module loader is experimental.
  internal/modules/run_main.js:54
  internalBinding('errors').triggerUncaughtException()</p>
  <p>any idea guys? i dont want to go back to require/module.exports</p>