I'm trying to run a single ES module .ts file in a Next.js project with default config for quick debugging:
npx ts-node lib/my_module.ts
which gives me this error:
Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
I wouldn't want to mess with the default config so looking for a sane way to make this work.