Skip to content

Bug: MODULE_NOT_FOUND for dist/bot-worker.js when running npx @tommertom/coderbot@latest #3

@seleckis

Description

@seleckis

Following the README instructions to run npx @tommertom/coderbot@latest, the bot starts the parent process successfully but the worker process crashes immediately because it cannot find dist/bot-worker.js.

Environment

  • macOS
  • Node.js: v20.19.0
  • Command: npx @tommertom/coderbot@latest
  • Fresh temporary directory

Steps to reproduce

  • Run npx @tommertom/coderbot@latest
  • Add bot token and use ID to .env
  • Run npx @tommertom/coderbot@latest again

Actual behavior

🤖 CoderBOT - AI-Powered Telegram Terminal Bot
================================================
🚀 Starting CoderBOT...

[Parent] Starting CoderBot parent process...
◇ injected env (30) from .env // tip: ⌘ override existing { override: true }
Warning: Control bot token set but no admin IDs configured. Set CONTROL_BOT_ADMIN_IDS.
[Parent] Configuration loaded successfully
ConfigService:
  - Bot Tokens: 1
  - Allowed Users: 1
  - Auto Kill: true
  - Xterm Max Lines: 1000
  - Xterm Session Timeout: 1800000ms
  - Xterm Terminal: 50x100
  - Xterm Shell: /bin/bash
  - Media Location: /tmp/coderBOT_media
  - Clean Up Media Dir: false
  - Message Delete Timeout: 10000ms
  - Screen Refresh Interval: 5000ms
  - Screen Refresh Max Count: 5
  - Bot Token Monitor Interval: 300000ms
  - Control Bot Enabled: true
  - Control Bot Admins: 0
  - Airplane Mode: false
  - TTS Enabled: false
  - TTS Provider: none
[Parent] Found 1 bot token(s)
[Parent] Starting 1 bot worker(s) via ProcessManager...
✅ Bot bot-1 started with PID 6995
[bot-1] node:internal/modules/cjs/loader:1215
  throw err;
  ^

Error: Cannot find module '/Users/seleckis/Sites/test/dist/bot-worker.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15)
    at Module._load (node:internal/modules/cjs/loader:1043:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:164:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.19.0
Bot bot-1 exited with code 1
[Parent] ✅ All 1 bot worker(s) started
[Parent] ✅ CoderBot parent process ready
[Parent] Warning: Control bot token set but no admin IDs configured

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions