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

[electron] iohook.node file not created for electron #67

Closed
zxiang77 opened this issue Apr 22, 2018 · 5 comments
Closed

[electron] iohook.node file not created for electron #67

zxiang77 opened this issue Apr 22, 2018 · 5 comments
Labels
awaiting feedback Waiting on an answer or information from issue or PR author to proceed electron Electron-related issues, bugs or questions

Comments

@zxiang77
Copy link

I added cmake-js to the package as instructed in the example but still cannot create the iohook.node file for electron. I feel current example for electron is not very clear. Could you give more explicit descriptions? Thanks!

Your Environment

my package.json

  "devDependencies": {
    "electron": "^1.8.4",
    "electron-rebuild": "^1.4.0"
  },
  "dependencies": {
    "iohook": "^0.1.15",
    "jQuery": "^1.7.4",
    "materialize-css": "^1.0.0-beta"
  },
  "cmake-js": {
    "runtime": "electron",
    "runtimeVersion": "1.4.7"
  }

and I tried both mac and windows. It seems electron-rebuild is using node-gyp but you are using cmake-js. Idk that could be the problem.

@Djiit
Copy link
Collaborator

Djiit commented Apr 23, 2018

Hi there !

You have to set the runtimeVerison in cmake-js accordingly.

Here you have electron 1.8.4 and a declared runtime version of 1.4.7

Try this :

  "cmake-js": {
    "runtime": "electron",
    "runtimeVersion": "1.8.4"
  }

Have a nice day

@zxiang77
Copy link
Author

Still not able to rebuild this package. The package seems not be updated after the rebuild at all. I worked around by manually run the install.js and changed runtime to 'electron', but it is crashing when loaded. Might load a wrong version of binary file. I'll investigate further. If I make it work I'll let you know !

@Djiit Djiit added the electron Electron-related issues, bugs or questions label Apr 27, 2018
@Djiit
Copy link
Collaborator

Djiit commented May 3, 2018

Hi there, do you have a correct "io-hook" dict in your package.json ? as in :

"iohook": {
  "targets": [
    "node-59",
    "electron-57"
  ],
  "platforms": [
    "win32",
    "darwin",
    "linux"
  ],
  "arches": [
    "x64",
    "ia32"
  ]
}

@Djiit Djiit added the awaiting feedback Waiting on an answer or information from issue or PR author to proceed label May 3, 2018
@zxiang77
Copy link
Author

Yeah. Adding iohook dict in package.json solved my problem. Note: You have to add the field before npm install iohook because the installation process depends on that field. You can close this issue now. Thanks!

@Mat-thieu
Copy link

Thanks @zxiang77 the docs aren't clear enough on this (although it does make sense thinking about it).

@Djiit Djiit closed this as completed Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Waiting on an answer or information from issue or PR author to proceed electron Electron-related issues, bugs or questions
Projects
None yet
Development

No branches or pull requests

3 participants