title: Error [ERR_REQUIRE_ESM]: require() of ES Module ... not supported
body: <p>I'm making a discord bot in <code>TypeScript</code> using <code>discord.js</code>. When I tried to compile code this morning I got this error:</p>
  <pre><code>C:\SECRET\Kostegator\dist\Util\getMeme.js:17
  const node_fetch_1 = __importDefault(require(&quot;node-fetch&quot;));
                                       ^
  
  Error [ERR_REQUIRE_ESM]: require() of ES Module C:\SECRET\Kostegator\node_modules\node-fetch\src\index.js from C:\SECRET\Kostegator\dist\Util\getMeme.js not supported.
  Instead change the require of index.js in C:\SECRET\Kostegator\dist\Util\getMeme.js to a dynamic import() which is available in all CommonJS modules.
      at Object.&lt;anonymous&gt; (C:\SECRET\Kostegator\dist\Util\getMeme.js:17:38)
      at Object.&lt;anonymous&gt; (C:\SECRET\Kostegator\dist\Util\index.js:15:14)
      at Object.&lt;anonymous&gt; (C:\SECRET\Kostegator\dist\Commands\BotOwner\startAutoUpdate.js:4:16)
      at C:\SECRET\Kostegator\dist\Client\index.js:61:41
      at Array.forEach (&lt;anonymous&gt;)
      at ExtendedClient.&lt;anonymous&gt; (C:\SECRET\Kostegator\dist\Client\index.js:58:48)        
      at Generator.next (&lt;anonymous&gt;)
      at C:\SECRET\Kostegator\dist\Client\index.js:27:71
      at new Promise (&lt;anonymous&gt;)
      at __awaiter (C:\SECRET\Kostegator\dist\Client\index.js:23:12)
      at ExtendedClient.init (C:\SECRET\Kostegator\dist\Client\index.js:51:16)
      at Object.&lt;anonymous&gt; (C:\SECRET\Kostegator\dist\index.js:19:4) {
    code: 'ERR_REQUIRE_ESM'
  }
  </code></pre>
  <p>Here's the GitHub repo: <a href="https://www.github.com/ProGamer2711/Kostegator" rel="noreferrer">Kostegator</a></p>