title: Can't import node-fetch into Typescript
body: <p>I'm trying to import <code>node-fetch</code> into my <code>Typescript</code> project but I fall into this error:</p>
  <blockquote>
  <p>[ERR_REQUIRE_ESM]: Must use import to load ES Module : /Users/xxx/xxx/xxx/xxx/xxx/xxx/xxx/node_modules/node-fetch/src/index.js require() of ES module is not supportes.</p>
  </blockquote>
  <p>This is my setup:</p>
  <ol>
  <li>node: v16.1.0</li>
  <li>typescript: 4.5.2</li>
  </ol>
  <p>The <code>node-fetch</code> package is imported in my project as followed: <code>import fetch from 'node-fetch';'</code></p>
  <p>This is my <code>tscongif.json</code>:</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;module&quot;: &quot;CommonJS&quot;,
      &quot;sModuleInterop&quot;: true,
      &quot;target&quot;: &quot;ES2020&quot;,
      &quot;allowJs&quot;: true,
      &quot;noImplicitAny&quot;: true,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;outDir&quot;: &quot;dist&quot;,
      &quot;baseUrl&quot;: &quot;.&quot;,
      &quot;experimentalDecorators&quot;: true,
      &quot;emitDecoratorMetadata&quot;: true,
      &quot;resolveJsonModule&quot;: true,
      &quot;typeRoots&quot;: [ 
        &quot;src/@types/&quot;,
        &quot;node_modules/@types&quot;,
      ],
      &quot;strict&quot;: true,
      &quot;strictNullChecks&quot;: true,
      &quot;allowSyntheticDefaultImports&quot;: true,
      &quot;forceConsistentCasingInFileNames&quot;: true,
      &quot;noFallthroughCasesInSwitch&quot;: true,
      &quot;noEmit&quot;: true,
      &quot;skipLibCheck&quot;: true,
    },
    &quot;include&quot;: [
      &quot;src/**/*&quot;,
      &quot;config/**/*&quot;
    ]
  }
  </code></pre>
  <p>I tried alse to add <code>&quot;type&quot;: &quot;module&quot;</code> into the <code>package.json</code> and set <code>&quot;module&quot;: &quot;ES2020&quot;</code> into the <code>tsconfig.json</code> but I got a new error:</p>
  <blockquote>
  <p>TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension &quot;.ts&quot;</p>
  </blockquote>
  <p>To run my code I use <code>nodemon</code> configured as follow:</p>
  <pre><code>{
    &quot;watch&quot;: [&quot;src&quot;],
    &quot;ext&quot;: &quot;ts, js, json&quot;,
    &quot;execMap&quot;: {
      &quot;ts&quot;: &quot;NODE_ENV=development ts-node -T&quot;
    }
  }
  </code></pre>