ESM support?
vovsemenv opened this issue · comments
reporpduce:
- add
"type": "module"
to package.json npm i -D beachball
- create
beachball.config.js
file npx beachball check
An error has been detected while running beachball!
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/vladimirsemenov/qameta/allure3/beachball.config.js from /Users/vladimirsemenov/qameta/allure3/node_modules/cosmiconfig/dist/loaders.js not supported.
Instead change the require of beachball.config.js in /Users/vladimirsemenov/qameta/allure3/node_modules/cosmiconfig/dist/loaders.js to a dynamic import() which is available in all CommonJS modules.
I think you'd need to either change the filename to beachball.config.cjs
, or change the config file to do export default { /*contents*/ }
instead of module.exports = { /*contents*/ }
.
Yes, i guess we need to note that in the docs