Open john3300 opened 3 years ago
I believe this could be solved by adding a post-install script to rebuild electron, as described in this thread
So to sum up: go to the modules/MMM-PIR-Sensor, then npm install electron-rebuild
then npm install
Hi,
Same issue here. I did a reinstall of the module and the instructions above
output of npm install electron-rebuild:
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm notice created a lockfile as package-lock.json. You should commit this file.
+ electron-rebuild@1.11.0
removed 1 package, updated 1 package and audited 164 packages in 19.9s
found 0 vulnerabilities
output of npm install:
> epoll@4.0.0 install /home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll
> node-gyp rebuild
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: Cannot find module '../dotjs/validate'
gyp ERR! stack at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
gyp ERR! stack at Function.Module._load (internal/modules/cjs/loader.js:562:25)
gyp ERR! stack at Module.require (internal/modules/cjs/loader.js:692:17)
gyp ERR! stack at require (internal/modules/cjs/helpers.js:25:18)
gyp ERR! stack at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/har-validator/node_modules/ajv/lib/compile/index.js:8:25)
gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:778:30)
gyp ERR! stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
gyp ERR! stack at Module.load (internal/modules/cjs/loader.js:653:32)
gyp ERR! stack at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
gyp ERR! stack at Function.Module._load (internal/modules/cjs/loader.js:585:3)
gyp ERR! System Linux 5.10.17-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll
gyp ERR! node -v v10.24.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! <https://github.com/nodejs/node-gyp/issues>
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! epoll@4.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the epoll@4.0.0 install 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/2021-04-20T12_19_49_643Z-debug.log
For me a simple
npm install
npm rebuild
Fixed the problem. (not changing anything else, well maybe I also deleted the package-lock.js
)
Here's the error log from startup: