News for hackers. Stuff that matters.
Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by praestigiare on Thursday August 06, 2020 @06:45AM (#24069755)
npm install esm

Then everything just works. Top level await and all.

Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by wonderlg on Thursday August 06, 2020 @11:31AM (#24071815)
Wait till you throw a package.json with "type": "module" in there.

Everything used to work until Node 12.15, then 12.16 started throwing when trying to require type:module packages with `require` (which is what `esm` does)

https://github.com/standard-things/esm/issues/868