Preflight Checklist
What's Wrong?
When I use the latest SDK (@anthropic-ai/claude-code@1.0.108) to run Claude without providing an executable path, it returns an error message saying executable not found.
What Should Happen?
The SDK can call Claude Code correctly when installed via native / npm global.
Error Messages/Logs
file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9950
throw new ReferenceError(errorMessage);
^
ReferenceError: Claude Code executable not found at /Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/cli.js. Is options.pathToClaudeCodeExecutable set?
at ProcessTransport.initialize (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9950:11)
at new ProcessTransport (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9908:8)
at query (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14759:20)
at ClaudeReviewService$1.callAgent (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14825:31)
at ClaudeReviewService$1.review (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14813:29)
at ReviewCode.execute (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:4879:48)
at async Command$2.reviewAction (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:4904:2)
at async Command$2.parseAsync (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:2003:4)
at async file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:15006:1
Node.js v22.16.0
Steps to Reproduce
- Create a TypeScript project with
pnpm init
- with
{ "bin": "dist/index.js" }
- Add
@anthropic-ai/claude-code as a dependency, implement some query
- Compile to
dist/index.js
- Use
npx . to run it
- Got an executable not found error
npm install -g or claude install to switch native version, both are unable to make it work correctly
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
1.0.67
Claude Code Version
1.0.108
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
No response
Preflight Checklist
What's Wrong?
When I use the latest SDK (
@anthropic-ai/claude-code@1.0.108) to run Claude without providing an executable path, it returns an error message saying executable not found.What Should Happen?
The SDK can call Claude Code correctly when installed via native / npm global.
Error Messages/Logs
file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9950 throw new ReferenceError(errorMessage); ^ ReferenceError: Claude Code executable not found at /Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/cli.js. Is options.pathToClaudeCodeExecutable set? at ProcessTransport.initialize (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9950:11) at new ProcessTransport (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:9908:8) at query (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14759:20) at ClaudeReviewService$1.callAgent (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14825:31) at ClaudeReviewService$1.review (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:14813:29) at ReviewCode.execute (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:4879:48) at async Command$2.reviewAction (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:4904:2) at async Command$2.parseAsync (file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:2003:4) at async file:///Users/elct9620/.npm/_npx/ffd3793520e2fbc9/node_modules/@aotoki/ccharness/dist/index.js:15006:1 Node.js v22.16.0Steps to Reproduce
pnpm init{ "bin": "dist/index.js" }@anthropic-ai/claude-codeas a dependency, implement some querydist/index.jsnpx .to run itClaude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
1.0.67
Claude Code Version
1.0.108
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
No response