Module Not Found
Your bot is trying to load a package or a file that doesn't exist on the server. This is the most common startup error, and it is usually fixed in under a minute.
What You See
Error: Cannot find module 'discord.js'
Require stack:
- /home/container/index.js
code: 'MODULE_NOT_FOUND'
ModuleNotFoundError: No module named 'discord'
Error: ENOENT: no such file or directory, open './config.json'
FileNotFoundError: [Errno 2] No such file or directory: 'config.json'
Read the name between quotes: it tells you which case you are in.
| The quoted name is... | Example | Go to |
|---|---|---|
| A package name | 'discord.js', 'dotenv', 'discord' | Missing package |
| Your entry file | '/home/container/index.js' | Entry file not found |
| One of your own files | './commands/Ping', 'config.json' | Wrong file path |
Missing Package
The package is not listed in your dependency file, so KataBump never installed it.
Fix for Node.js
- Open
package.jsonand check that the package is listed under"dependencies" - If not, add it (on your computer,
npm install <package>does it for you), then upload the updatedpackage.json - Restart the server so dependencies are reinstalled
{
"dependencies": {
"discord.js": "^14.14.1",
"dotenv": "^16.4.5"
}
}
Fix for Python
- Open
requirements.txtand check that the package is listed - Make sure you use the package name, which is not always the name you import (see table below)
- Restart the server
| You write in your code | Put in requirements.txt |
|---|---|
import discord | discord.py |
from dotenv import load_dotenv | python-dotenv |
import yaml | pyyaml |
from PIL import Image | pillow |
from bs4 import BeautifulSoup | beautifulsoup4 |
You can also add packages without editing your files, from the ADDITIONAL NODE/PY PACKAGES field in the "Startup" tab. Keeping them in package.json / requirements.txt is still the cleanest option.
Entry File Not Found
KataBump can't find the file it is supposed to run. Two usual causes:
- The startup file name doesn't match. In the "Startup" tab, the JS FILE / PY FILE value must match your file exactly (e.g.
bot.jsand notindex.js). - Your files are inside a sub-folder. This often happens after unzipping: your project ends up in
/home/container/my-bot/instead of/home/container/. Open the "Files" tab and move everything up one level so thatpackage.jsonorrequirements.txtsits directly at the root.
/home/container /home/container
└── my-bot/ ✗ ├── package.json ✓
├── package.json ├── index.js
└── index.js └── commands/
Wrong File Path
Uppercase and Lowercase Matter
Windows and macOS don't care about case, but KataBump servers run Linux, which does. A bot that works on your computer can fail on the server because of a single capital letter:
// File on disk: commands/ping.js
require('./commands/Ping'); // ✗ fails on Linux
require('./commands/ping'); // ✓
Relative Paths
Paths like ./config.json are resolved from the folder the bot is started from, not from the file that contains the line. Build paths from the current file's location instead:
const path = require('node:path');
const fs = require('node:fs');
const config = JSON.parse(
fs.readFileSync(path.join(__dirname, 'config.json'), 'utf8')
);
from pathlib import Path
import json
BASE_DIR = Path(__file__).parent
config = json.loads((BASE_DIR / "config.json").read_text())
File Not Uploaded
Check in the "Files" tab that the file really exists on the server. Files starting with a dot (like .env) are sometimes skipped when creating a ZIP or hidden by your SFTP client.
Check the error index or open a ticket with the full error and a screenshot of your "Files" tab.