ITADN

[Bug]: CLI crashes on any command with "Received 'grey'" TypeError on Node.js v25

#1543Openjesseagleboy 创建于 2026-03-26
bugin progress
J
jesseagleboycommented
### What happened? <img width="1164" height="220" alt="Image" src="https://github.com/user-attachments/assets/77cc6ff3-32d2-4718-971e-eb091c09acff" /> Any StudioCMS CLI command (e.g. `studiocms migrate`) crashes immediately on Node.js v25 during startup — before any command logic runs — with: ```zsh TypeError: The argument 'format' must be one of: 'reset', 'bold', ... 'gray', ... Received 'grey' at styleText (node:util:209:7) at createClackMessageUpdate (.../node_modules/@withstudiocms/cli-kit/dist/messages.js:130:83) at say (.../node_modules/@withstudiocms/cli-kit/dist/messages.js:182:21) ``` Node.js v25 removed `'grey'` as a valid `styleText` format alias — only `'gray'` is accepted. `@withstudiocms/cli-kit/dist/messages.js` uses `'grey'` in `createClackMessageUpdate`, causing the crash. **Expected behavior:** CLI starts and runs commands successfully. **Workaround (bun patch):** ```bash bun patch @withstudiocms/cli-kit sed -i '' 's/grey/gray/g' node_modules/@withstudiocms/cli-kit/dist/messages.js bun patch --commit 'node_modules/@withstudiocms/cli-kit' ``` **Package**: @withstudiocms/cli-kit ### Package studiocms ### Version 0.4.4 ### Debug output ```shell ┌ StudioCMS Debug Information │ ● Astro Unavailable │ Astro Adapter @astrojs/netlify │ Database Dialect LibSQL │ Node.js v25.8.1 │ Package Manager bun │ System macOS (ARM64) │ StudioCMS Unavailable │ StudioCMS UI Unavailable │ StudioCMS Plugins StudioCMS HTML - @studiocms/html │ StudioCMS MarkDoc - @studiocms/markdoc │ StudioCMS Markdown - @studiocms/md │ StudioCMS MDX - @studiocms/mdx │ StudioCMS WYSIWYG Editor - @studiocms/wysiwyg │ └ ``` ### What browsers are you seeing the problem on? _No response_ ### Relevant log output ```shell 19:11:20 [ERROR] [studiocms:runtime/cli/utils/intro] [19:11:20.612] ERROR (#18): UnknownException: An unknown error occurred in Effect.tryPromise at fail (effect/dist/esm/internal/core-effect.js:579:75) [cause]: TypeError: The argument 'format' must be one of: ... 'gray', ... Received 'grey' at styleText (node:util:209:7) at createClackMessageUpdate (@withstudiocms/cli-kit/dist/messages.js:130:83) at say (@withstudiocms/cli-kit/dist/messages.js:182:21) 19:11:20 [ERROR] [studiocms:runtime/cli/migrator] 19:11:20 [ERROR] [studiocms:runtime/cli/utils/context.genContext] error: script "studiocms" exited with code 1 ```
3 条评论