electron-builder
electron-builder copied to clipboard
Not download electron from custom mirror
- Electron-Builder Version: 23.0.3
- Node Version: v14.19.2
- Electron Version: 15.3.0
- Electron Type (current, beta, nightly): custom mirror
- Target: dmg
webpack 5.72.0 compiled successfully in 23227 ms
[1] npm run build-renderer exited with code 0
• electron-builder version=23.0.3 os=21.4.0
• loaded configuration file=package.json ("build" field)
• writing effective config file=out/builder-effective-config.yaml
• rebuilding native dependencies [email protected], [email protected] platform=darwin arch=x64
⨯ cannot execute cause=exit status 1
out=
> [email protected] install /Users/X/Documents/repo/y-z-pc/node_modules/ffi-napi
> node-gyp-build
errorOut=gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 response downloading https://electronjs.org/headers/v15.3.3-tt.3.release.main.3/node-v15.3.3-tt.3.release.main.3.tar.gz
gyp ERR! stack at go (/Users/X/Documents/repo/y-z-pc/node_modules/node-gyp/lib/install.js:153:17)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:95:5)
gyp ERR! stack at async install (/Users/X/Documents/repo/y-z-pc/node_modules/node-gyp/lib/install.js:62:18)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/Users/X/Documents/repo/node-v14.19.2-darwin-x64/bin/node" "/Users/X/Documents/repo/y-z-pc/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/X/Documents/repo/y-z-pc/node_modules/ffi-napi
gyp ERR! node -v v14.19.2
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/X/.npm/_logs/2022-06-02T06_54_57_423Z-debug.log
command=/Users/X/Documents/repo/node-v14.19.2-darwin-x64/bin/node /Users/X/Documents/repo/node-v14.19.2-darwin-x64/lib/node_modules/npm/bin/npm-cli.js rebuild [email protected] [email protected]
workingDir=
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] package-mac: `npm run build && electron-builder build --mac`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] package-mac script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/X/.npm/_logs/2022-06-02T06_54_57_489Z-debug.log
electron-builder config:
"build": {
"appId": "xxx",
"files": [
"dist/",
"package.json",
],
"asar": true,
"asarUnpack": [
"src/main/imcppsdk/lib/"
],
"mac": {
"category": "public.app-category.developer-tools",
"target": "dmg",
"hardenedRuntime": true,
"type": "development"
},
"directories": {
"output": "out"
},
"electronVersion": "15.3.3-tt.3.release.main.3",
"electronDownload": {
"mirror": "custom mirror"
}
}
In https://github.com/electron-userland/electron-builder/blob/d835aba702caa3efc7788c7c1c0b1e11638ee4c1/packages/app-builder-lib/src/util/yarn.ts#L70, I see npm_config_disturl
is https://electronjs.org/headers
, can I config this value?
Can u try to delete mac.target
?
Because auto-update will download .zip
file for updating the app, not .dmg
file
As for auto-update to work with MacOS, your app need to be sign with apple developer account and notarize.