Better-SQLite3 can cause some issues if not setup correctly. We provide a complete working version of Zeltux with better-sqlite3 precompiled when working on Windows, the environment it was created for.
If you wish to use the bot on another operating system then you will just need to reinstall better-sqlite3 yourself, which is very easy if done properly.
Check out the better-sqlite page on npm to find out how to do this.
better-sqlite3, similarly to a lot of modules, gets compiled using
node-gyp which has 2 very important requirements:
Python 2.7 and the
C++ Build Tools. For windows, open up an Elevated (Administrator) command prompt and run the following FIRST, before installing better-sqlite3:
npm i --vs2015 -g windows-build-tools. For linux, you need
sudo apt-get install build-essential and you need to figure out how to install
Python 2.7 (NOT
Python 3!) on your system.
This issue should be fixed by rebuilding integer and better-sqlite3
npm rebuild integer --update-binarynpm rebuild better-sqlite3 --update-binary
Within the root directory of the bot, create a folder called
data. This should solve your issue.
Update your node.js to the latest version, then this error should be fixed.
To reinstall better-sqlite3 follow these steps:
npm install (this will take a long time) OR upload this file.
If you need any help, feel free to get in touch on our discord server.