Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/claude_agent_sdk/_internal/transport/subprocess_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ def _find_cli(self) -> str:
if path.exists() and path.is_file():
return str(path)

node_installed = shutil.which("node") is not None

if not node_installed:
error_msg = "Claude Code requires Node.js, which is not installed.\n\n"
error_msg += "Install Node.js from: https://nodejs.org/\n"
error_msg += "\nAfter installing Node.js, install Claude Code:\n"
error_msg += " npm install -g @anthropic-ai/claude-code"
raise CLINotFoundError(error_msg)

raise CLINotFoundError(
"Claude Code not found. Install with:\n"
" npm install -g @anthropic-ai/claude-code\n"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def _test():
async for _ in query(prompt="test"):
pass

assert "Claude Code requires Node.js" in str(exc_info.value)
assert "Claude Code not found" in str(exc_info.value)

anyio.run(_test)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_find_cli_not_found(self):
):
SubprocessCLITransport(prompt="test", options=ClaudeAgentOptions())

assert "Claude Code requires Node.js" in str(exc_info.value)
assert "Claude Code not found" in str(exc_info.value)

def test_build_command_basic(self):
"""Test building basic CLI command."""
Expand Down
Loading