Something has gone wrong recently and I’m not sure what happened.
I had my MM unplugged for a few weeks. When I attempted to use it again, the Pi wouldn’t run MM.
I investigated and the error log shows that electron is missing. Understand that the device was working perfectly fine, then I simply unplugged the device, it sat in my backpack for a while, and then I plugged it back in.
I tried reinstalling node and a hundred other things, then just gave up and started from scratch using the same method @sdetweil and I cobbled together a few months ago.
But now that doesn’t work.
Help.
Error: Cannot find module 'electron'
Require stack:
- /home/dvg/MagicMirror/js/electron.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
at Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:81:25)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (/home/dvg/MagicMirror/js/electron.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
at Module._compile (node:internal/modules/cjs/loader:1241:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/dvg/MagicMirror/js/electron.js' ]
}