-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Trying to use Electron to make a DMG file for Mac and ran into a number of issues that I can't seem to sort out.
The most consistent issue that I was receiving is that the app would crash automatically on load and give an error along the lines of:
Uncaught Exception:
Error: Cannot find module 'sqlite3'
Require stack:
- /Applications/Commonbase Desktop.app/Contents/Resources/app.asar/.vite/build/main.js
-
at Module._resolveFilename (node:internal/modules/cjs/loader:1390:15)
at s._resolveFilename (node:electron/js2c/browser_init:2:130206)
at defaultResolveImpl (node:internal/modules/cjs/loader:1032:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1037:22)
at Module._load (node:internal/modules/cjs/loader:1199:37)
at c._load (node:electron/js2c/node_init:2:17993)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:244:24)
at Module.require (node:internal/modules/cjs/loader:1470:12)
at require (node:internal/modules/helpers:147:16)
I tried using Drizzle ORM, Type ORM, Better SQLite 3, Regular SQLite with no ORM, and I ran into the same issue over and over and over. I moved between Postgres and SQLite as well, and I would run into the issue "Cannot Find Module". or sometimes "path is undefined"
Sometimes the app wouldn't even start, and it would just cancel automatically. Currently, the dev version works with npm start, but I can't figure out how to package this into a one-click executable and actually have it function with the vector database that it needs to do its core functionality.