Description
The .cjs launcher scripts in the scripts/ directory are missing the #!/usr/bin/env node shebang line. When these files are executed directly via shell alias (as set up by Claude Code's shell integration), the shell attempts to interpret them as bash scripts, resulting in syntax errors.
Error Message
scripts/claude_remote_launcher.cjs: line 1: syntax error near unexpected token `('
scripts/claude_remote_launcher.cjs: line 1: `const originalSetTimeout = global.setTimeout;'
Root Cause
The alias created by Claude Code's shell integration points directly to the .cjs file:
alias mcp-cli='/path/to/happy-coder/scripts/claude_remote_launcher.cjs --mcp-cli'
Without a shebang, the shell uses the default interpreter (bash) instead of Node.js.
Affected Files
scripts/claude_remote_launcher.cjs
scripts/claude_local_launcher.cjs
Suggested Fix
Add #!/usr/bin/env node as the first line of each launcher script:
#!/usr/bin/env node
// Intercept setTimeout for the Claude Code SDK
const originalSetTimeout = global.setTimeout;
// ...
Environment
- OS: macOS
- Node.js installed via Volta
- happy-coder version: 0.12.0
Description
The
.cjslauncher scripts in thescripts/directory are missing the#!/usr/bin/env nodeshebang line. When these files are executed directly via shell alias (as set up by Claude Code's shell integration), the shell attempts to interpret them as bash scripts, resulting in syntax errors.Error Message
Root Cause
The alias created by Claude Code's shell integration points directly to the
.cjsfile:Without a shebang, the shell uses the default interpreter (bash) instead of Node.js.
Affected Files
scripts/claude_remote_launcher.cjsscripts/claude_local_launcher.cjsSuggested Fix
Add
#!/usr/bin/env nodeas the first line of each launcher script:Environment