Nodejs, TypeScript, ts-node-dev & top-level await

TL;DR: Don’t use ECMAScript modules with ts-node or ts-node-dev (yet); just refactor the top-level await out Today I tumbled down the same rabbit hole, starting with the innocuous error: Top-level ‘await’ expressions are only allowed when the ‘module’ option is set to ‘esnext’ or ‘system’, and the ‘target’ option is set to ‘es2017’ or higher. … Read more