Open astralarya opened 3 months ago
This looks like it could be related: https://stackoverflow.com/questions/69081410/error-err-require-esm-require-of-es-module-not-supported
Maybe it would be fixed if you added:
"module": true,
to the package.json
?
Yeah, the issue is that Kanel is not (yet) ESM-ready. Sadly, it's not quite as easy as changing that one line, and making the change will affect everyone who is not setting "module": true
in their package.json. I do intend to do something about this because I am facing issues with it myself, but I can't guarantee when.
If you want a hacky workaround, I know one friend who comments out the "module": true
line in his package.json
every time he runs Kanel and then undoes that afterwards. I know, not pretty, but it does work...
I ran into this issue for a project that uses "type": "module"
.
My workaround was to rename .kanelrc.js
to .kanelrc.cjs
, then override the config import:
kanel --config .kanelrc.cjs
Edit: this isn't necessary, because kanel automatically recognizes .kanelrc.cjs
Version:
"kanel": "^3.8.8",
node: v20.8.0Attempting to run
kanel
. Config file below:Content of
.kanelrc.js
: