I would get this error message when running kill-the-newsletter after building it myself:
node:internal/modules/cjs/loader:1041
throw new ERR_REQUIRE_ESM(filename, true);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /tmp/caxa/kill-the-newsletter/2srbcxrtto/node_modules/@leafac/html/build/index.mjs not supported.
Instead change the require of /tmp/caxa/kill-the-newsletter/2srbcxrtto/node_modules/@leafac/html/build/index.mjs to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/tmp/caxa/kill-the-newsletter/2srbcxrtto/distribution/index.js:13:16) {
code: 'ERR_REQUIRE_ESM'
Since caxa ignores the package-lock.json, version 3.0.3 of leafac/html is installed, which already is migrated to use ESM imports; with this PR I require the old version of the dependency that can be imported normally.
I would get this error message when running
kill-the-newsletter
after building it myself:Since caxa ignores the package-lock.json, version 3.0.3 of leafac/html is installed, which already is migrated to use ESM imports; with this PR I require the old version of the dependency that can be imported normally.