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

How to disable enforced compilation? #179

Open
sebastianrath opened this issue Apr 21, 2022 · 1 comment
Open

How to disable enforced compilation? #179

sebastianrath opened this issue Apr 21, 2022 · 1 comment

Comments

@sebastianrath
Copy link

sebastianrath commented Apr 21, 2022

Hey there,

I am using node-gyp and prebuild-install to build native node modules for an Electron application. The repos of the dependencies don't have the versions prebuilt that I need, so they need to be compiled locally.

However, calling npm install a second time doesn't result in a cache hit. I noticed the --force flag, introduced by
#48. Where is this set to true?

Any help is highly appreciated!


  • rebuilding native dependencies  dependencies=drive-name@1.0.3, drivelist@9.2.4 platform=darwin arch=x64
  • install prebuilt binary  name=drivelist version=9.2.4 platform=darwin arch=x64 napi=
  • execute command  command=/usr/local/bin/node /Volumes/FooProject/node_modules/prebuild-install/bin.js --platform=darwin --arch=x64 --target=14.2.8 --runtime=electron --verbose --force
                     workingDirectory=/Volumes/FooProject/node_modules/drivelist
  • build native dependency from sources  name=drivelist
                                          version=9.2.4
                                          platform=darwin
                                          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 5.3.6
    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 cached prebuild @ /Users/sebastian/.npm/_prebuilds/5a2fbc-drivelist-v9.2.4-electron-v89-darwin-x64.tar.gz
    prebuild-install http request GET https://github.com/balena-io-modules/drivelist/releases/download/v9.2.4/drivelist-v9.2.4-electron-v89-darwin-x64.tar.gz
    prebuild-install http 404 https://github.com/balena-io-modules/drivelist/releases/download/v9.2.4/drivelist-v9.2.4-electron-v89-darwin-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=14.2.8 runtime=electron arch=x64 libc= platform=darwin)
@Julusian
Copy link

Julusian commented May 7, 2022

electron-builder does its own manual invocation of prebuild-install, and is the one setting that flag https://github.com/develar/app-builder/blob/4e2aa6a12e2bc3d31ec0d01d661fb3a4d65248ff/pkg/node-modules/rebuild.go#L220

My guess is that it might need to do that to ensure the correct platform/architecture is installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants