Invalid ELF Header
You uploaded your node_modules folder from your computer. Some packages contain compiled code built for Windows or macOS, which can't run on KataBump's Linux servers.
What You See
The error usually mentions a package with native code, such as better-sqlite3, sqlite3, bcrypt, canvas or sharp:
console
Error: /home/container/node_modules/better-sqlite3/build/Release/better_sqlite3.node: invalid ELF header
code: 'ERR_DLOPEN_FAILED'
A close cousin appears after changing the Node.js version in the "Startup" tab:
console
Error: The module '.../better_sqlite3.node' was compiled against a different Node.js version
using NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 127.
How to Fix It
- Stop the server
- In the "Files" tab, select the
node_modulesfolder and delete it - Check that your
package.jsonis at the root and lists all your dependencies - Start the server — KataBump reinstalls the dependencies and builds them for Linux and the selected Node.js version
Don't Upload node_modules
KataBump installs your dependencies automatically from package.json. Uploading node_modules yourself is never needed, and it causes problems:
- Compatibility: native modules built on your computer won't work on Linux (this page)
- Size:
node_modulesis often hundreds of MB — that's most of the 716 MB of the Free plan, and over the 100 MB web upload limit - Speed: thousands of tiny files make uploads very slow
When you create your ZIP, leave it out:
structure
my-bot.zip
├── package.json ✓ upload
├── package-lock.json ✓ upload
├── index.js ✓ upload
├── commands/ ✓ upload
└── node_modules/ ✗ leave out
Python Too
The same goes for Python: don't upload your local virtual environment (venv/, .venv/). KataBump creates its own and installs packages from requirements.txt.
Still Stuck?
Check the error index or open a ticket on Discord.