claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] React error #31 when using custom slash command

Open artnikbrothers opened this issue 5 days ago • 1 comments

Description

React minified error #31 occurs when using a custom slash command from .claude/commands/.

Steps to Reproduce

  1. Create custom command in .claude/commands/my-command.md
  2. Invoke with /my-command
  3. Error appears

Error Output

ERROR Minified React error #31; visit
https://react.dev/errors/31?args[]=object%20with%20keys%20%7Bsource%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

file:///.nvm/versions/node/v22.18.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:743:8724

-cB (file:///...cli.js:743:8724)
-XB (file:///...cli.js:743:10834)
-QD (file:///...cli.js:743:12402)
-yE (file:///...cli.js:743:14687)
- (file:///...cli.js:743:15200)
-OZ (file:///...cli.js:743:35534)
-Hx (file:///...cli.js:743:51675)
-jJ (file:///...cli.js:743:85801)
-cf (file:///...cli.js:743:84781)
-zj (file:///...cli.js:743:84606)

Environment

  • Claude Code version: v2.1.2
  • Node: v22.18.0
  • Platform: macOS Darwin 25.2.0

Additional Context

Error #31 means "Objects are not valid as a React child" - something with key {source} is being passed where a renderable element is expected.

artnikbrothers avatar Jan 09 '26 01:01 artnikbrothers

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/16910

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Jan 09 '26 01:01 github-actions[bot]