-
Notifications
You must be signed in to change notification settings - Fork 445
Description
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.2directly (ESM-only)inquirer@8.2.7→ora@5.4.1→log-symbols@4.1.0→chalk@^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