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

Prebuilt binaries for Electron 8? #7

Open
jacobweber opened this issue Feb 29, 2020 · 2 comments
Open

Prebuilt binaries for Electron 8? #7

jacobweber opened this issue Feb 29, 2020 · 2 comments

Comments

@jacobweber
Copy link

Hi! I found this plugin from this issue. I tried to install it using electron-builder, with this in my package.json:

"postinstall": "electron-builder install-app-deps"

But it looks like there's not a prebuilt binary for Electron 8. I get this error:

  • electron-builder  version=22.3.5
  • loaded configuration  file=package.json ("build" field)
  • rebuilding native dependencies  [email protected] platform=darwin arch=x64
  • install prebuilt binary  name=forcefocus version=1.0.0 platform=darwin arch=x64
  • build native dependency from sources  name=forcefocus
                                          version=1.0.0
                                          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 5.3.3
    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/jacobweber/.npm/_prebuilds/bf1c5a-forcefocus-v1.0.0-electron-v76-darwin-x64.tar.gz
    prebuild-install http request GET https://github.com/robinwassen/forcefocus/releases/download/v1.0.0/forcefocus-v1.0.0-electron-v76-darwin-x64.tar.gz
    prebuild-install http 404 https://github.com/robinwassen/forcefocus/releases/download/v1.0.0/forcefocus-v1.0.0-electron-v76-darwin-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=8.0.2 runtime=electron arch=x64 libc= platform=darwin)
    
  ⨯ cannot execute  cause=exit status 1
                    out=
    > [email protected] install /Users/jacobweber/myapp/node_modules/forcefocus
    > prebuild-install || node-gyp rebuild
    
      CXX(target) Release/obj.target/forcefocus/src/bindings.o
    
                    errorOut=prebuild-install WARN install No prebuilt binaries found (target=8.0.2 runtime=electron arch=x64 libc= platform=darwin)
    ../src/bindings.cc:40:52: error: no viable conversion from 'MaybeLocal<v8::String>' to 'Local<v8::String>'
          isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Expected one argument")));
                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8.h:189:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'MaybeLocal<v8::String>' to 'const v8::Local<v8::String> &' for 1st argument
    class Local {
          ^
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8.h:189:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'MaybeLocal<v8::String>' to 'v8::Local<v8::String> &&' for 1st argument
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8.h:193:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
      V8_INLINE Local(Local<S> that)
                ^
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8.h:7083:47: note: passing argument to parameter 'message' here
      static Local<Value> TypeError(Local<String> message);
                                                  ^
    ../src/bindings.cc:45:21: error: no viable conversion from 'MaybeLocal<v8::String>' to 'Local<v8::String>'
          Local<String> message = String::NewFromUtf8(isolate, "Expected first argument to be a window handle buffer");
                        ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8.h:189:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'MaybeLocal<v8::String>' to 'const v8::Local<v8::String> &' for 1st argument
    class Local {
          ^
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8.h:189:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'MaybeLocal<v8::String>' to 'v8::Local<v8::String> &&' for 1st argument
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8.h:193:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
      V8_INLINE Local(Local<S> that)
                ^
    ../src/bindings.cc:50:85: warning: 'ToObject' is deprecated: Use maybe version [-Wdeprecated-declarations]
        unsigned char* windowHandleBuffer = (unsigned char*)node::Buffer::Data(args[0]->ToObject());
                                                                                        ^
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8.h:2794:3: note: 'ToObject' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version")
      ^
    /Users/jacobweber/.electron-gyp/8.0.2/include/node/v8config.h:397:37: note: expanded from macro 'V8_DEPRECATED'
    #   define V8_DEPRECATED(message) [[deprecated(message)]]
                                        ^
    1 warning and 2 errors generated.
    make: *** [Release/obj.target/forcefocus/src/bindings.o] Error 1
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/Users/jacobweber/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
    gyp ERR! System Darwin 18.7.0
    gyp ERR! command "/Users/jacobweber/.nvm/versions/node/v10.16.3/bin/node" "/Users/jacobweber/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/jacobweber/myapp/node_modules/forcefocus
    gyp ERR! node -v v10.16.3
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok 
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `prebuild-install || node-gyp rebuild`
    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.

Any chance you could create one? Many thanks. I'm building on Mac OS 10.14.6.

@jacobweber
Copy link
Author

Actually I realized that my issue wasn't caused by a focus problem, so I don't need this anymore.

@joaomlemos
Copy link

joaomlemos commented Jun 24, 2020

@robinwassen - I'm facing similar issue with Electron 9. Are you planning to update this ?

In my case I'm just doing npm install --save forcefocus
And this is the error

> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.16.1 runtime=node arch=x64 libc= platform=darwin)
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
...

Thanks!

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