electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

Can't reconcile two non-macho files node_modules/register-scheme/node-addon-api/src/node-api.target.mk

Open marf opened this issue 2 years ago • 3 comments

Hello, when we try to package and publish our app for Mac Universal target we get this error:

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], [email protected], [email protected] platform=darwin arch=x64
  • rebuilding native dependency  name=electron-media-service version=0.2.2
  • rebuilding native dependency  name=electron-deeplink version=1.0.10
  • rebuilding native dependency  name=register-scheme version=0.0.2
  • packaging       platform=darwin arch=x64 electron=19.0.3 appOutDir=dist/mac-universal--x64
  • rebuilding native dependencies  [email protected], [email protected], [email protected] platform=darwin arch=arm64
  • rebuilding native dependency  name=electron-media-service version=0.2.2
  • rebuilding native dependency  name=electron-deeplink version=1.0.10
  • rebuilding native dependency  name=register-scheme version=0.0.2
  • packaging       platform=darwin arch=arm64 electron=19.0.3 appOutDir=dist/mac-universal--arm64
  • packaging       platform=darwin arch=universal electron=19.0.3 appOutDir=dist/mac-universal
  ⨯ **Can't reconcile two non-macho files node_modules/register-scheme/node-addon-api/src/node-api.target.mk**  failedTask=build stackTrace=Error: Can't reconcile two non-macho files node_modules/register-scheme/node-addon-api/src/node-api.target.mk
    at Object.exports.mergeASARs (/Users/marco/eSound-Client/desktop/electron/node_modules/@electron/universal/src/asar-utils.ts:151:13)
    at exports.makeUniversalApp (/Users/marco/eSound-Client/desktop/electron/node_modules/@electron/universal/src/index.ts:205:13)
    at MacPackager.doPack (/Users/marco/eSound-Client/desktop/electron/node_modules/app-builder-lib/src/macPackager.ts:125:9)
    at MacPackager.pack (/Users/marco/eSound-Client/desktop/electron/node_modules/app-builder-lib/src/macPackager.ts:191:7)
    at Packager.doBuild (/Users/marco/eSound-Client/desktop/electron/node_modules/app-builder-lib/src/packager.ts:441:9)
    at Object.executeFinally (/Users/marco/eSound-Client/desktop/electron/node_modules/builder-util/src/promise.ts:12:14)
    at Packager._build (/Users/marco/eSound-Client/desktop/electron/node_modules/app-builder-lib/src/packager.ts:376:31)
    at Packager.build (/Users/marco/eSound-Client/desktop/electron/node_modules/app-builder-lib/src/packager.ts:337:12)
    at Object.executeFinally (/Users/marco/eSound-Client/desktop/electron/node_modules/builder-util/src/promise.ts:12:14)
error Command failed with exit code 1.

Any ideas what we should do to solve the issue? This hasn't happened before.

Thanks!

  • Electron-Builder Version: 23.0.3
  • Node Version: 17.8.0
  • Electron Version: 19.0.3
  • Electron Type (current, beta, nightly): current
  • Target: Mac universal

marf avatar Jun 04 '22 09:06 marf

We are having the same problem.

geroale avatar Jun 05 '22 08:06 geroale

Probably not the right solution, but found just by ignoring the file / folder in package.json solves the build problem. E.g. enter the following

"build": {
   "files": [
       "!**/node_modules/register-scheme/node-addon-api/src/node-api.target.mk"
   ]
}

More details in this thread:

https://github.com/TryGhost/node-sqlite3/issues/1612#issuecomment-1168468382

jklp avatar Jul 14 '22 07:07 jklp

Probably not the right solution, but found just by ignoring the file / folder in package.json solves the build problem. E.g. enter the following

"build": {
   "files": [
       "!**/node_modules/register-scheme/node-addon-api/src/node-api.target.mk"
   ]
}

More details in this thread:

TryGhost/node-sqlite3#1612 (comment)

I ended up having to exclude the whole register-scheme directory. 😅

build": {
   "files": [
       "!**/node_modules/register-scheme/**/*"
   ]
}

This doesn't seem great. What's going on here?

voidrender avatar Aug 25 '22 03:08 voidrender

Updates on this? I still am facing this issue on electron-builder: ^23.6.0

Monochromish avatar Feb 24 '23 10:02 Monochromish