Skip to content

netlify-cli crashes with bunx on Node.js v24: chalk v5/v4 ESM/CJS conflict #7997

@schickling-assistant

Description

@schickling-assistant

Summary

bunx netlify-cli@latest crashes on Node.js v24 with TypeError: chalk.blue is not a function due to a dependency resolution conflict between chalk v5 (ESM-only, direct dep) and chalk v4 (CJS, needed by transitive deps).

Root cause

netlify-cli depends on:

  • chalk@5.6.2 directly (ESM-only)
  • inquirer@8.2.7ora@5.4.1log-symbols@4.1.0chalk@^4.1.0 (CJS)

Bun's flat dependency resolution hoists chalk@5 globally, so log-symbols@4 gets chalk v5 instead of chalk v4. Since chalk v5 is ESM-only and log-symbols uses require('chalk'), the default export resolves incorrectly under Node.js v24's stricter CJS/ESM interop — chalk.blue is undefined.

Error trace

TypeError: chalk.blue is not a function
    at Object.<anonymous> (/tmp/bunx-924-netlify-cli@latest/node_modules/log-symbols/index.js:6:14)
    ...
Node.js v24.13.0
error: postinstall script from "netlify-cli" exited with 1

Environment

  • bunx netlify-cli@latest (v24.0.1)
  • Node.js v24.13.0
  • Bun 1.3.9

Suggested fix

Update inquirer to a version that doesn't transitively depend on chalk v4 (e.g. @inquirer/prompts which uses chalk v5 natively), or pin log-symbols to v5+ which dropped the chalk dependency.

Workaround

Use pnpm --package=netlify-cli dlx netlify instead of bunx netlify-cli, as pnpm correctly isolates conflicting dependency versions.

🤖 Filed on behalf of @schickling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions