problem when running npm electron rebuild
See original GitHub issueSo I have had a few problems with this and started over a few times, and now again as I fear the reason I had problems was because i missed/skipped some steps during the installation.
Now I have successfully gotten to the npm electron -rebuild command, with only a few errors along the way (which I have resolved and then re run the commands that failed).
So when running it, I gets this:
mmm-awesome-alexa@1.0.0 electron-rebuild /home/pi/MagicMirror/modules/MMM-awesome-alexa electron-rebuild --pre-gyp-fix
✖ Rebuild Failed An unhandled error occurred inside electron-rebuild Could not detect abi for version 2.0.0 and runtime electron. Updating “node-abi” might help solve this issue if it is a new release of electron
Error: Could not detect abi for version 2.0.0 and runtime electron. Updating “node-abi” might help solve this issue if it is a new release of electron
at Object.getAbi (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/node-abi/index.js:43:9)
at _callee6$ (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/lib/rebuild.js:152:37)
at tryCatch (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/node_modules/regenerator-runtime/runtime.js:337:22)
at Generator.prototype.(anonymous function) [as next] (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/node_modules/regenerator-runtime/runtime.js:96:21)
at Generator.tryCatcher (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/bluebird/js/release/util.js:16:23)
at PromiseSpawn._promiseFulfilled (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/bluebird/js/release/generators.js:97:49)
at /home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/bluebird/js/release/generators.js:201:15
at _rebuild (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/lib/rebuild.js:613:18)
at rebuild (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/lib/rebuild.js:624:28)
at _callee$ (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/lib/cli.js:160:45)
at tryCatch (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/node_modules/regenerator-runtime/runtime.js:337:22)
at Generator.prototype.(anonymous function) [as next] (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/electron-rebuild/node_modules/regenerator-runtime/runtime.js:96:21)
at Generator.tryCatcher (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/bluebird/js/release/util.js:16:23)
at PromiseSpawn._promiseFulfilled (/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/bluebird/js/release/generators.js:97:49)
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! mmm-awesome-alexa@1.0.0 electron-rebuild: electron-rebuild --pre-gyp-fix
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the mmm-awesome-alexa@1.0.0 electron-rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2019-01-04T20_10_47_558Z-debug.log
And here log file:
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’,
1 verbose cli ‘/usr/bin/npm’,
1 verbose cli ‘run’,
1 verbose cli ‘electron-rebuild’ ]
2 info using npm@5.6.0
3 info using node@v8.0.0
4 verbose run-script [ ‘preelectron-rebuild’,
4 verbose run-script ‘electron-rebuild’,
4 verbose run-script ‘postelectron-rebuild’ ]
5 info lifecycle mmm-awesome-alexa@1.0.0~preelectron-rebuild: mmm-awesome-alexa@1.0.0
6 info lifecycle mmm-awesome-alexa@1.0.0~electron-rebuild: mmm-awesome-alexa@1.0.0
7 verbose lifecycle mmm-awesome-alexa@1.0.0~electron-rebuild: unsafe-perm in lifecycle true
8 verbose lifecycle mmm-awesome-alexa@1.0.0~electron-rebuild: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle mmm-awesome-alexa@1.0.0~electron-rebuild: CWD: /home/pi/MagicMirror/modules/MMM-awesome-alexa
10 silly lifecycle mmm-awesome-alexa@1.0.0~electron-rebuild: Args: [ ‘-c’, ‘electron-rebuild --pre-gyp-fix’ ]
11 silly lifecycle mmm-awesome-alexa@1.0.0~electron-rebuild: Returned: code: 255 signal: null
12 info lifecycle mmm-awesome-alexa@1.0.0~electron-rebuild: Failed to exec electron-rebuild script
13 verbose stack Error: mmm-awesome-alexa@1.0.0 electron-rebuild: electron-rebuild --pre-gyp-fix
13 verbose stack Exit status 255
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:887:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
14 verbose pkgid mmm-awesome-alexa@1.0.0
15 verbose cwd /home/pi/MagicMirror/modules/MMM-awesome-alexa
16 verbose Linux 4.14.87-v7+
17 verbose argv “/usr/local/bin/node” “/usr/bin/npm” “run” “electron-rebuild”
18 verbose node v8.0.0
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 255
22 error mmm-awesome-alexa@1.0.0 electron-rebuild: electron-rebuild --pre-gyp-fix
22 error Exit status 255
23 error Failed at the mmm-awesome-alexa@1.0.0 electron-rebuild script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 255, true ]
I looked at a few of the other issues related to this but none of it helped for me (might says that I havent tried changing node version (currently 8.0.0) as having node 8 was the only way I could get “npm install --only=prod” to work.)
Any ideas?
Issue Analytics
- State:
- Created 5 years ago
- Comments:37
Top GitHub Comments
Not to worry tony I appreciate all your help.
On the electron github page I found some answers and managed to get everything installed, had npm run electron-rebuild run without problems. So got one step further. Now I got a problem with the config.js though, but I think i messed up the syntax again so ill go over that tomorrow.
Thanks for all the help!
Ok no problem I would love to help people who is determined in this type of project.