Skip to content

fix(create): Resolve ERR_REQUIRE_ESM error for chalk/ora #359

Open
SabaliDev wants to merge 1 commit into
celo-org:mainfrom
SabaliDev:main
Open

fix(create): Resolve ERR_REQUIRE_ESM error for chalk/ora #359
SabaliDev wants to merge 1 commit into
celo-org:mainfrom
SabaliDev:main

Conversation

@SabaliDev
Copy link
Copy Markdown

The create command was failing with an ERR_REQUIRE_ESM error when executed via npx. This issue stemmed from the use of static require() imports for chalk and ora, both of which are now published as pure ES Modules.

This commit refactors the code to use dynamic import() for these dependencies, which is the correct and compatible approach when loading ESM packages in a CommonJS context. This resolves the runtime error and restores functionality when running the CLI via npx.

Fixes #358

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 27, 2025

👷 Deploy request for celo-composer pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit a36b045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Error: require() of ES Module chalk not supported in @celo/celo-composer

1 participant