[BUG] Build error: duplicate createRequire imports prevent daemon startup
Open 💬 0 comments Opened Jun 12, 2026 by cristinac-max
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Claude-to-IM bridge fails to start with a duplicate import error in the built daemon.
What Should Happen?
Should be able to run my configuration
Error Messages/Logs
### Error Message
SyntaxError: Identifier 'createRequire' has already been declared
at file:///Users/cristinac/.agents/skills/claude-to-im/dist/daemon.mjs:13
import { createRequire } from "module";
^^^^^^^^^^^^^
Steps to Reproduce
- Run
/claude-to-im setupand configure Feishu (or any channel) - Run
/claude-to-im start - Observe the build error
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.175
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
The built dist/daemon.mjs has duplicate imports:
- Line 1:
import { createRequire } from 'module'; - Line 13:
import { createRequire } from "module";(duplicate)
This causes Node.js to reject the module as invalid. The issue appears to be in the build tooling (likely esbuild or tsx configuration) that generates the daemon bundle.
Attempted Fixes
- ✅
npm installin the skill directory - ✅
npm run buildto rebuild the daemon - ✅ Both
.claudeand.agentsskill directories exhibit the same issue - ❌ Manual removal of duplicate imports didn't fully resolve the underlying build problem