-
Notifications
You must be signed in to change notification settings - Fork 970
Electron
lava6666 edited this page Oct 21, 2022
·
4 revisions
You can use this line to rebuild RobotJS for Electron:
npm rebuild --runtime=electron --target=1.1.3 --disturl=https://atom.io/download/atom-shell --abi=48
Target should be the Electron version, and abi should be the abi version of the included Node. You can check what version of Node is used in Electron by looking it up in the releases page or by using process.version
(see Quick Start for example) or run electron -v && electron -a
. You can find the correct abi version here.
You can include this line in the scripts section of your package.json to build RobotJS automatically.
"rebuild": "npm rebuild --runtime=electron --target=1.1.3 --disturl=https://atom.io/download/atom-shell --abi=48"
Run npm i -D electron-rebuild
to add the electron-rebuild package (if not already installed).
Run ./node_modules/.bin/electron-rebuild
to rebuild everything.