Since you don’t mentioned what solutions you have tried, I might be giving you an advice you have already explored, but have you tried path.resolve to get an absolute path for your db.
Also, on another note. I’m not sure why you have the replace function around that path. Its replacing a string that isn’t there.
Let me give you a summary and some context. So this is one of my first projects as a software developer. I’m new in the industry and this is one of my flagship projects to include on my portfolio. It is not an electron app but I installed the module because it was one of the potential solutions I found. So this is what I have done:
First I was getting this error. I had the folder /napi-v6-win32-glibc-x64 but there was no such folder /napi-v6-linux-glibc-x64 so I created a folder and found online the node_sqlite.node file for linux. Apparently it worked.
(Image 1)
I installed electron-rebuild and added the following:
(Image 2)
Then I removed that code and wrapped the db opening within a promise
(Image 3)
Well I have made other minor changes but nothing significant. I have installed and uninstalled modules that I have read might help but nothing has changed. I have tried installing sqlite3@5.0.0 but it didn’t make any difference.
Thank you so much in advance for taking the time to help me.
In addition, if using SQLite, you’ll need a Disk. Render runtime instance filesystems are ephemeral, meaning anything written to the instance filesystem at runtime will be lost when it next restarts (e.g. next deploy). If you need persisted files (user uploads, generated files, etc.) you’d need to add a disk, with a SQLite database created within the mount path you specify.
Hello @al_ps, I was exploring the alternative of including a Disk, but I realized that’s not a free service. To be honest, this is just a school project and all I want is to deploy it for potential employers. I want this to be part of my portfolio. Is there any way I can deploy the project using the free version???