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

prebuild-install failed with error (run with env DEBUG=electron-builder to get more information) #2673

Closed
sujiewen opened this issue Apr 25, 2021 · 4 comments

Comments

@sujiewen
Copy link

electron-builder install-app-deps

• electron-builder version=22.10.5
• rebuilding native dependencies [email protected] platform=darwin arch=x64
• install prebuilt binary name=sharp version=0.27.2 platform=darwin arch=x64
• build native dependency from sources name=sharp
version=0.27.2
platform=darwin
arch=x64
reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
error=prebuild-install info begin Prebuild-install version 6.1.2
prebuild-install WARN install prebuilt binaries enforced with --force!
prebuild-install WARN install prebuilt binaries may be out of date!
prebuild-install info looking for local prebuild @ prebuilds/sharp-v0.27.2-electron-v85-darwin-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/xx/.electron-gyp/.npm/_prebuilds/3aff7b-sharp-v0.27.2-electron-v85-darwin-x64.tar.gz
prebuild-install http request GET https://github.com/lovell/sharp/releases/download/v0.27.2/sharp-v0.27.2-electron-v85-darwin-x64.tar.gz
prebuild-install WARN install connect ETIMEDOUT 140.82.113.4:443

npm WARN [email protected] requires a peer of webpack@^5.20.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of html-webpack-plugin@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.

removed 6 packages and audited 2221 packages in 120.577s

126 packages are looking for funding
run npm fund for details

================================

./node_modules/.bin/electron-rebuild

npm install --build-from-source

Can't succeed

================================

Environment:

node v14.16.1
electron v11.3.0
macOS 10.15.7

@lovell
Copy link
Owner

lovell commented Apr 25, 2021

There are two problems here, the first is a (temporary?) network problem:

prebuild-install WARN install connect ETIMEDOUT 140.82.113.4:443

If you're based in China, please see https://sharp.pixelplumbing.com/install#chinese-mirror

You're also likely to be affected by a bug in electron-builder, please see electron-userland/electron-builder#5438

@sujiewen
Copy link
Author

prebuild-install http request GET https://github.com/lovell/sharp/releases/download/v0.27.2/sharp-v0.27.2-electron-v85-darwin-x64.tar.gz

It should be impossible to download from this address.

@sujiewen
Copy link
Author

• electron-builder version=22.10.5 os=19.6.0
• electron-rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies

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_electron/builder-effective-config.yaml
• rebuilding native dependencies [email protected] platform=win32 arch=x64
• install prebuilt binary name=sharp version=0.28.1 platform=win32 arch=x64
⨯ cannot build native dependency reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible
cause=exit status 1
errorOut=prebuild-install info begin Prebuild-install version 6.1.2
prebuild-install WARN install prebuilt binaries enforced with --force!
prebuild-install WARN install prebuilt binaries may be out of date!
prebuild-install info looking for local prebuild @ prebuilds/sharp-v0.28.1-electron-v87-win32-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/lc/.npm/_prebuilds/e4bca0-sharp-v0.28.1-electron-v87-win32-x64.tar.gz
prebuild-install http request GET https://github.com/lovell/sharp/releases/download/v0.28.1/sharp-v0.28.1-electron-v87-win32-x64.tar.gz
prebuild-install http 404 https://github.com/lovell/sharp/releases/download/v0.28.1/sharp-v0.28.1-electron-v87-win32-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.0.5 runtime=electron arch=x64 libc= platform=win32)

                                command=/usr/local/bin/node /Users/lc/st/wmswarehouse/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=12.0.5 --runtime=electron --verbose --force
                                workingDir=/Users/lc/st/wmswarehouse/node_modules/sharp

ExecError: /Users/lc/st/wmswarehouse/node_modules/app-builder-bin/mac/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess. (/Users/lc/st/wmswarehouse/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
exitCode: 2,
alreadyLogged: true,
code: 'ERR_ELECTRON_BUILDER_CANNOT_EXECUTE'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@lovell
Copy link
Owner

lovell commented Apr 26, 2021

Please see electron-userland/electron-builder#5438 as advised.

@sujiewen sujiewen closed this as completed May 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants