geelen / shellac

Coat your shell scripts in something a bit more beautiful
MIT License
156 stars 4 forks source link

No longer able to `require`? #12

Open IanVS opened 1 year ago

IanVS commented 1 year ago

I tried following the instructions in the README to require('shellac').default, but I get

const shellac = require("shellac").default;
                ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/ianvs/code/defined/ansible/deployer/src/node_modules/shellac/dist/index.js from /Users/ianvs/code/defined/ansible/deployer/src/webclient-cloudflare.js not supported.

Is the readme just incorrect, and I have to use a dynamic import() now?