Preflight Checklist
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 setup and 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 install in the skill directory
- ✅
npm run build to rebuild the daemon
- ✅ Both
.claude and .agents skill directories exhibit the same issue
- ❌ Manual removal of duplicate imports didn't fully resolve the underlying build problem
Preflight Checklist
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
Steps to Reproduce
/claude-to-im setupand configure Feishu (or any channel)/claude-to-im startClaude 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.mjshas duplicate imports:import { createRequire } from 'module';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 directorynpm run buildto rebuild the daemon.claudeand.agentsskill directories exhibit the same issue