electron-builder
electron-builder copied to clipboard
Can't reconcile two non-macho files node_modules/register-scheme/node-addon-api/src/node-api.target.mk
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
We are having the same problem.
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
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:
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?
Updates on this? I still am facing this issue on electron-builder: ^23.6.0