Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS crash on electron builder v24.6.4 #7770

Closed
coltoneshaw opened this issue Sep 10, 2023 · 1 comment
Closed

MacOS crash on electron builder v24.6.4 #7770

coltoneshaw opened this issue Sep 10, 2023 · 1 comment

Comments

@coltoneshaw
Copy link

coltoneshaw commented Sep 10, 2023

  • Electron-Builder Version:
    24.6.4
  • Node Version:
    v20.5.1
  • Electron Version: 26.1.0
  • Electron Type (current, beta, nightly): current
  • Target: mac --x64

When on electron-builder v24.6.4 I get below errors when building, yet the application opens and runs perfectly. When i manually update the yarn.lock file to have an updated version of node-abi it builds properly, but the application crashes on opening.

Building with v24.6.4 (working with failed rebuild)

To ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`
  • writing effective config  file=dist/builder-effective-config.yaml
  • rebuilding native dependencies  [email protected] platform=darwin arch=x64
  • install prebuilt binary  name=better-sqlite3 version=8.5.2 platform=darwin arch=x64 napi=
  • build native dependency from sources  name=better-sqlite3
                                          version=8.5.2
                                          platform=darwin
                                          arch=x64
                                          napi=
                                          reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=/Users/coltonshaw/Desktop/scripts/pcomvp-desktop/node_modules/prebuild-install/node_modules/node-abi/index.js:39
      throw new Error('Could not detect abi for version ' + target + ' and runtime ' + runtime + '.  Updating "node-abi" might help solve this issue if it is a new release of ' + runtime)
      ^
    
    Error: Could not detect abi for version 26.1.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
        at getAbi (/Users/coltonshaw/Desktop/scripts/pcomvp-desktop/node_modules/prebuild-install/node_modules/node-abi/index.js:39:9)
        at module.exports (/Users/coltonshaw/Desktop/scripts/pcomvp-desktop/node_modules/prebuild-install/rc.js:54:57)
        at Object.<anonymous> (/Users/coltonshaw/Desktop/scripts/pcomvp-desktop/node_modules/prebuild-install/bin.js:8:27)
        at Module._compile (node:internal/modules/cjs/loader:1233:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
        at Module.load (node:internal/modules/cjs/loader:1091:32)
        at Module._load (node:internal/modules/cjs/loader:938:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
        at node:internal/main/run_main_module:23:47
    
    Node.js v20.5.1

yarn.lock update

"prebuild-install@npm:^7.1.0":
  version: 7.1.1
  resolution: "prebuild-install@npm:7.1.1"
  dependencies:
    detect-libc: ^2.0.0
    expand-template: ^2.0.3
    github-from-package: 0.0.0
    minimist: ^1.2.3
    mkdirp-classic: ^0.5.3
    napi-build-utils: ^1.0.1
 -   node-abi: ^3.3.0
 +  node-abi: ^3.47.0
    pump: ^3.0.0
    rc: ^1.2.7
    simple-get: ^4.0.0
    tar-fs: ^2.0.0
    tunnel-agent: ^0.6.0
  bin:
    prebuild-install: bin.js
  checksum: dbf96d0146b6b5827fc8f67f72074d2e19c69628b9a7a0a17d0fad1bf37e9f06922896972e074197fc00a52eae912993e6ef5a0d471652f561df5cb516f3f467
  languageName: node
  linkType: hard

Screenshot 2023-09-10 at 9 16 59 AM

@coltoneshaw
Copy link
Author

Closing as it might be related to better-sqlite3

@coltoneshaw coltoneshaw closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant