electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.46k stars 1.71k forks source link

Dependencies not rebuilt when prebuilt binaries not found? #8217

Closed d-0-s-t closed 3 weeks ago

d-0-s-t commented 1 month ago

Electron-builder apparently cannot find prebuilt binaries for a specific package "@thiagoelg/node-printer" but I am not sure if the build process is rebuilding them from source. There are no failure messages but there is no success message either. These warnings:

• rebuilding native dependencies dependencies=@thiagoelg/node-printer@0.6.2 platform=win32 arch=x64 • install prebuilt binary name=@thiagoelg/node-printer version=0.6.2 platform=win32 arch=x64 napi= • build native dependency from sources name=@thiagoelg/node-printer version=0.6.2 platform=win32 arch=x64 napi= reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information) error=prebuild-install info begin Prebuild-install version 7.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\node-printer-v0.6.2-electron-v123-win32-x64.tar.gz prebuild-install info looking for cached prebuild @ C:\Users\RelaxBro\AppData\Local\npm-cache_prebuilds\ab65f8-node-printer-v0.6.2-electron-v123-win32-x64.tar.gz prebuild-install http request GET https://github.com/thiagoelg/node-printer/releases/download/v0.6.2/node-printer-v0.6.2-electron-v123-win32-x64.tar.gz
prebuild-install http 404 https://github.com/thiagoelg/node-printer/releases/download/v0.6.2/node-printer-v0.6.2-electron-v123-win32-x64.tar.gz prebuild-install warn install No prebuilt binaries found (target=30.0.2 runtime=electron arch=x64 libc= platform=win32)

• packaging platform=win32 arch=x64 electron=30.0.2 appOutDir=dist\win-unpacked

How can I make sure this package is built from source?

ImpChiang commented 1 month ago

hi, any solution about it ? i got same error ,when i upgrade Electron-Builder to v25.0.0-alpha.6, but it throw another error

d-0-s-t commented 1 month ago

@ImpChiang Added another dev dependency @electron/rebuild to specially build the package in question. But it seems excess.

Running this script before the build process now: electron-rebuild -f -w @thiagoelg/node-printer

mmaietta commented 1 month ago

Would you be willing to try v25.0.0-alpha.8, it integrates electron-rebuild package directly and should respect those flags more explicitly

d-0-s-t commented 3 weeks ago

@mmaietta Apologies for being late.

I tried with v25.0.0-alpha.9 and can confirm that the binary for the package mentioned is built now.

• electron-builder version=25.0.0-alpha.9 • executing @electron/rebuild electronVersion=30.1.0 arch=x64 buildFromSource=false appDir=./ • installing native dependencies arch=x64 • preparing moduleName=@thiagoelg/node-printer arch=x64 • finished moduleName=@thiagoelg/node-printer arch=x64 • completed installing native dependencies

Thanks. :)

mmaietta commented 3 weeks ago

Great to hear! Closing this issue then.