The ESM build/output is broken, as interpreted by NodeJS: nodejs/node#34515
Basically, NodeJS is not able to recognize the files in ./dist/esm/ as being ESM modules, because the files do not end in .mjs, and the closest package.json file to them does not contain type: module.
My opinion is that NodeJS should infer the files as ESM modules automatically (in this case, based on the module field pointing into the ./dist/esm folder), but the NodeJS devs seem opposed to that idea.
In the meantime, I must keep pestering library developers in the hopes they will appease NodeJS's ESM-import mode rules. 😭
The ESM build/output is broken, as interpreted by NodeJS: nodejs/node#34515
Basically, NodeJS is not able to recognize the files in
./dist/esm/as being ESM modules, because the files do not end in.mjs, and the closestpackage.jsonfile to them does not containtype: module.My opinion is that NodeJS should infer the files as ESM modules automatically (in this case, based on the
modulefield pointing into the./dist/esmfolder), but the NodeJS devs seem opposed to that idea.In the meantime, I must keep pestering library developers in the hopes they will appease NodeJS's ESM-import mode rules. 😭