m4heshd / better-sqlite3-multiple-ciphers

better-sqlite3 with multiple-cipher encryption support 🔒
MIT License
137 stars 27 forks source link

Unable to use package on electron #95

Closed Mohab-Saber closed 2 months ago

Mohab-Saber commented 2 months ago

First, some notes about my project. The project is a Desktop App to view and edit SQLite DB. I use Electron and Express.

During development and testing of Express API, I only start the "server.js" file, which only starts Express without the FrontEnd (Electron). "better-sqlite3-multiple-ciphers" works just fine and passes all CRUD tests.

When I try to start the project from electron using command "electron .", The server starts in the background and Electron opens the home page (indicating that "express static" is working properly). But when I use the API to do CRUD operations, I get that error

"better-sqlite3-multiple-ciphers" was compiled against a different Node.js version using NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 125. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).

I tried npm rebuild and npm install but it was in vain. I also tried 4 versions of node and also it was in vain. The 4 versions were:- 22.3.0 22.1.0 21.7.3 20.11.0

I am obviously a beginner and This is my first real project. Thanks in advance!

Mohab-Saber commented 2 months ago

Finally, after three hours of trying, I managed to get the project working.

It was a long journy and it was quite excity!