Description
The bot fails to start with npm run bot1 due to a missing config.json file.
Error
Error: Cannot find module './config.json'
Require stack:
- /root/claude-code-telegram-bot/ActivityWatchIntegration.js
- /root/claude-code-telegram-bot/SessionManager.js
- /root/claude-code-telegram-bot/bot.js
- /root/claude-code-telegram-bot/scripts/start-bot.js
Root Cause
ActivityWatchIntegration.js line 2 has a hard requirement on ./config.json:
const config = require('./config.json');
This config is used on lines 181-182:
config.activityWatch.integration.fakeAppName
config.activityWatch.integration.sessionTitleTemplate
However, config.json is in .gitignore and there is no example file or documentation on how to create it.
Suggested Fix
Either:
- Add default values in the code when config.json is missing
- Create a
config.json.example file with required structure
- Document the required config.json structure in README
Environment
- Node.js v24.12.0
- npm run bot1
Description
The bot fails to start with
npm run bot1due to a missingconfig.jsonfile.Error
Root Cause
ActivityWatchIntegration.jsline 2 has a hard requirement on./config.json:This config is used on lines 181-182:
config.activityWatch.integration.fakeAppNameconfig.activityWatch.integration.sessionTitleTemplateHowever,
config.jsonis in.gitignoreand there is no example file or documentation on how to create it.Suggested Fix
Either:
config.json.examplefile with required structureEnvironment