anaisbetts / node-system-idle-time

Node module to get system-idle-time, fork with Linux support
https://bitbucket.org/rbergman/node-system-idle-time
101 stars 34 forks source link

The module '/Users/saleh/Projects/employee-time-tracking/node_modules/@paulcbetts/system-idle-time/build/Release/system_idle_time.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 57. This version of Node.js requires NODE_MODULE_VERSION 64. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). #14

Open FatimaArfa opened 5 years ago

FatimaArfa commented 5 years ago

I am trying this plugin in my electron app but it gives this error "The module '/Users/saleh/Projects/employee-time-tracking/node_modules/@paulcbetts/system-idle-time/build/Release/system_idle_time.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 57. This version of Node.js requires NODE_MODULE_VERSION 64. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install)." Node(v8.15.0) Npm(6.4.1) electron(v4.0.1) this is my package.json { "name": "tracking-app", "productName": "tracking-app", "version": "1.0.0", "description": "Application for tracking app", "main": "main.js", "scripts": { "start": "electron .", "package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --prune=true --out=release-builds", "package-win": "electron-packager . tracking-app --overwrite --asar=true --platform=win32 --arch=ia32 --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"Electron Tutorial App\"", "package-linux": "electron-packager . tracking-app --overwrite --icon=assets/images.png --platform=linux --arch=x64 --prune=true --out=release-builds", "create-installer-win": "node installers/windows/createinstaller.js", "create-installer-mac": "electron-installer-dmg ./release-builds/tracking-app-darwin-x64/tracking-app.app tracking-app --out=release-builds --overwrite", "create-installer-linux": "electron-installer-debian --src release-builds/tracking-app-linux-x64/ --arch amd64 --config debian.json", "pack": "build --dir", "dist": "build", "rebuild": "electron-rebuild" }, "keywords": [ "Electron", "quick", "start", "tutorial", "demo" ], "author": "GitHub", "license": "CC0-1.0", "devDependencies": { "electron": "^3.0.10", "electron-builder": "^20.38.4", "electron-installer-dmg": "^2.0.0", "electron-packager": "^13.0.0", "electron-rebuild": "^1.8.2", "electron-winstaller": "^2.7.0" }, "dependencies": { "@paulcbetts/system-idle-time": "^1.0.4", "app-root-path": "^2.1.0", "auto-launch": "^5.0.5", "aws-sdk": "^2.356.0", "bindings": "^1.3.1", "bootstrap": "^4.0.0-beta", "electron-process": "^0.2.0", "electron-workers": "^1.10.3", "font-awesome": "^4.7.0", "idle-timeout": "^1.1.1", "jquery": "^3.3.1", "moment": "^2.22.2", "multiparty": "^4.2.1", "nan": "^2.12.1", "node-localdb": "0.0.3", "popper.js": "^1.14.5", "progress": "^2.0.3", "progressbar.js": "^1.0.1", "screenshot-desktop": "^1.5.3", "simple-local-db": "^1.0.1" } } Help will be much appriciated

hovancik commented 5 years ago

use package electron-builder and then inside script in package.json put "postinstall": "electron-builder install-app-deps",

example: https://github.com/hovancik/stretchly