News for hackers. Stuff that matters.
Re:Finally, a guide for Node.js and TypeScript and ESM that ... by lloydatkinson on Tuesday November 21, 2023 @05:52AM (#38361982)
I was about to say exactly this. If you’re writing Node scripts there’s no reason to use ts-node as tsx, by default, does the correct thing and works correctly with ES modules.

Of course, Deno offers a better experience for scripts or programs.

Re:Finally, a guide for Node.js and TypeScript and ESM that ... by khalidx on Tuesday November 21, 2023 @06:29AM (#38362252)
I tried `tsx` but it didn't work for some reason (can't remember why right now). Also, if you've been using `ts-node` and feel comfortable with it, this setup should work for you instead of switching your toolchain.
Re:Finally, a guide for Node.js and TypeScript and ESM that ... by privatenumber on Tuesday November 21, 2023 @08:51AM (#38363568)
tsx v4 was released a couple weeks ago which addressed many incompatibility issues. Hope you have a chance to give it another shot :)
Re:Finally, a guide for Node.js and TypeScript and ESM that ... by khalidx on Tuesday November 21, 2023 @09:33PM (#38373919)
I definitely will!