title: To load an ES module, set "type": "module" in the package.json or use the .mjs extension
body: <p>I am trying to run on desktop this <a href="https://github.com/tiansin/vscode-php-debug" rel="noreferrer">repository</a> a vscode extension.</p>
  <p>I cloned it locally and run <code>npm install</code></p>
  <p>Press f5 on vscode editor and got an error</p>
  <pre><code>Process exited with code 1
  (node:1404) Warning: To load an ES module, set &quot;type&quot;: &quot;module&quot; in the package.json or use the .mjs extension.
  (Use `node --trace-warnings ...` to show where the warning was created)
  internal/process/warning:44
  Canceled
  </code></pre>
  <p>To work around with the warning I found another stackoverflow question -
  <a href="https://stackoverflow.com/questions/63588714/node9374-warning-to-load-an-es-module-set-type-module">(node:9374) Warning: To load an ES module, set &quot;type&quot;: &quot;module&quot;</a></p>
  <p>So I set <code>&quot;type&quot;:&quot;module&quot;</code> on <code>package.json</code> and press f5 again.</p>
  <p>and another error show up.</p>
  <pre><code>Process exited with code 1
  Uncaught TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension &quot;.ts&quot; for /mnt/c/vscode-php-debug/src/phpDebug.ts
  </code></pre>
  <p>And found another question on stackoverflow - <a href="https://stackoverflow.com/questions/62096269/cant-run-my-node-js-typescript-project-typeerror-err-unknown-file-extension">Can&#39;t run my Node.js Typescript project TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension &quot;.ts&quot; for /app/src/App.ts</a></p>
  <p>So I remove &quot;type&quot;:&quot;module&quot; what happens is I'm in the loop now, confuse.</p>
  <p>Does anyone tried debugging this or encounter as such?</p>