How to run 'sqlite3' after building an exe using electron-builder

16 Views Asked by At

I'm building my app using electron js. I eventually used the electron builder in order to package it into an executable. This worked, but upon running the exe, I got an error shown in the screenshot.

Error

my package.json:

{
  "name": "shadow-labyrinth",
  "version": "1.0.0",
  "description": "a game",
  "main": "main.js",
  "scripts": {
    "start": "electron ."
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "electron": "^29.0.0",
    "electron-builder": "^24.13.3",
    "electron-rebuild": "^3.2.9"
  },
  "dependencies": {
    "sqlite3": "5.1.6",
    "uniq": "^1.0.1"
  },
  "build": {
    "appId": "com.example.shadow-labyrinth",
    "win": {
      "target": "nsis"
    },
    "linux": {
      "target": "AppImage",
      "category": "Utility"
    },
    "mac": {
      "target": "dmg",
      "category": "public.auxWall.services"
    },
    "directories": {
      "output": "dist",
      "buildResources": "build"
    },
    "electronVersion": "29.1.4"
  }
}

Can anyone help me resolve this issue?

I tried reinstalling sqlite3 and nothing else worked.

0

There are 0 best solutions below