Typical errors: wrong Node version, missing intents, wrong start file

The five setup mistakes behind most bot tickets and the one-line fix for each.

1 min readUpdated 2026-09-14Diese Anleitung auf Deutsch lesen →
  1. Wrong Node version. SyntaxError: Unexpected token on modern syntax, or a library refusing to load: change the Docker image in Startup to Node 20 or 22, restart.
  2. Missing intents. The bot starts but never sees messages: enable Message Content Intent (and Server Members if needed) in the Developer Portal and pass the intents when creating the client.
  3. Wrong start file. Cannot find module '/home/container/index.js': set MAIN_FILE / PY_FILE to your real entry file, including a src/ prefix if applicable.
  4. Token in the code, code on GitHub. The token gets reset by Discord automatically when it detects a leak, and your bot dies with invalid token. Move it to .env.
  5. Bot online but commands do nothing. Slash commands must be registered once (REST.put(Routes.applicationCommands(...)) in discord.js, tree.sync() in discord.py). Global commands take up to an hour to appear; guild commands are instant.

Bonus: "Cannot send messages to this user" means the user has DMs closed; catch the error instead of crashing.