rvion / CushyStudio

🛋 The AI and Generative Art platform for everyone
https://docs.cushystudio.com/
GNU Affero General Public License v3.0
662 stars 48 forks source link

Issue running CushyStudio right after install (macOS M1) #101

Open nini1294 opened 9 months ago

nini1294 commented 9 months ago

Describe the bug

OS: macOS (M1)

Getting a blank screen and error below in the console right after installing and starting.

Error is below

better_sqlite3.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

Full Stack Trace

Uncaught Error: dlopen(**CushyStudio/node_modules/.pnpm/better-sqlite3@9.2.2/node_modules/better-sqlite3/build/Release/better_sqlite3.node, 0x0001): tried: '**CushyStudio/node_modules/.pnpm/better-sqlite3@9.2.2/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '**/CushyStudio/node_modules/.pnpm/better-sqlite3@9.2.2/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (no such file), '**/CushyStudio/node_modules/.pnpm/better-sqlite3@9.2.2/node_modules/better-sqlite3/build/Release/better_sqlite3.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:2131)
    at Object.<anonymous> (node:internal/modules/cjs/loader:1356:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2131)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at node:internal/modules/cjs/loader:967:12
    at Function.<anonymous> (node:electron/js2c/asar_bundle:2:13327)
    at Function._load (node:electron/js2c/renderer_init:2:4757)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at new Database (database.js:52:11)
nini1294 commented 9 months ago

Ok I think I found the issue

This line in ./node_modules/.bin/electron-builder install-app-deps

Needed to be replaced with ./node_modules/.bin/electron-builder install-app-deps --arch arm64

Which gets the right version of better-sqlite3

Please close this issue if nothing else is needed