Skip to content
Open
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
7 changes: 7 additions & 0 deletions .changeset/fix-node24-dynamic-require.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@react-grab/claude-code": patch
---

fix: replace cross-spawn with native node:child_process to fix Node.js v24 compatibility

The CLI was failing on Node.js v24 with "Dynamic require of child_process is not supported" because cross-spawn uses dynamic require() for native modules. Replacing it with the native node:child_process module resolves this issue.
2 changes: 0 additions & 2 deletions packages/provider-claude-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
"build": "rm -rf dist && NODE_ENV=production tsup"
},
"devDependencies": {
"@types/cross-spawn": "^6.0.6",
"tsup": "^8.4.0"
},
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.1.0",
"@hono/node-server": "^1.19.6",
"cross-spawn": "^7.0.6",
"fkill": "^9.0.0",
"hono": "^4.0.0",
"picocolors": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-claude-code/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import { join } from "node:path";
import spawn from "cross-spawn";
import { spawn } from "node:child_process";
import pc from "picocolors";
import { DEFAULT_PORT } from "./constants.js";

Expand Down
12 changes: 3 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.