[BUG] Cannot read properties of undefined (reading 'split')
Resolved 💬 3 comments Opened Jul 24, 2025 by iSevenDays Closed Aug 19, 2025
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.59 (Claude Code)
- Operating System: macOS sequoia
- Terminal: iTerm2
Bug Description
<!-- A clear and concise description of the bug -->
claude code crashes when creating a new file
> create new file with current date time timestamp
⏺ I'll create a new file with the current date and time timestamp. Let me do that for you.
TypeError: Cannot read properties of undefined (reading 'split')
at nHB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:117)
at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1355:123
at Object.useMemo (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:26368)
at Kz9.useMemo (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:15588)
at gL (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1355:75)
at RM (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)
at Tv (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)
at Rv (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)
at YS (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)
at lM (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)
ERROR Cannot read properties of undefined (reading 'split')
file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:117
- nHB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:117)
- (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1355:123)
- Object.useMemo (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:26368)
- Kz9.useMemo (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:15588)
- gL (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1355:75)
- RM (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)
- Tv (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)
- Rv (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)
- YS (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)
- lM (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)
TypeError: Cannot read properties of undefined (reading 'split')
at nHB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:117)
at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1355:123
at Object.useMemo (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:26368)
at Kz9.useMemo (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:46:15588)
at gL (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1355:75)
at RM (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)
at Tv (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)
at Rv (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)
at YS (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)
at lM (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)
Steps to Reproduce
as the following prompts
- list files
- create new file with current date time timestamp
Expected Behavior
new file with current date time timestamp
Actual Behavior
crash
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗