Read the statement by Michael Teeuw here.
After 2.8 I'm having tons of issues. What are the steps from square 1 to get this working?
-
@sdetweil
I tried to excute some of the commands you gave mepi@raspberrypi:~ $ pm2 logs [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2 internal/modules/cjs/loader.js:583 throw err; ^ Error: Cannot find module 'shelljs' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (/usr/local/lib/node_modules/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) at module.exports.Client.launchDaemon (/usr/local/lib/node_modules/pm2/lib/Client.js:244:7) at /usr/local/lib/node_modules/pm2/lib/Client.js:103:10 at /usr/local/lib/node_modules/pm2/lib/Client.js:311:14 at process._tickCallback (internal/process/next_tick.js:61:11) pi@raspberrypi:~ $ npm i -g npm npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! path /usr/local/lib/node_modules/npm npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm' npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm'] npm ERR! stack: npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm\'', npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules/npm' } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator (though this is not recommended). npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2019-08-06T18_59_40_902Z-debug.log pi@raspberrypi:~ $I ran “pm2 logs” and “npm i -g npm”
Looks like I got similar results. Should I donpm installIn the MagicMirror folder now?
-
-
@sdetweil Sweet I think that worked
pi@raspberrypi:~ $ sudo npm i -g npm /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js + npm@6.10.3 updated 3 packages in 128.39s pi@raspberrypi:~ $Now that I have done that, Should I run
npm installand then:
cd ~/MagicMirror npm install -
@Gomalley only
cd ~/MagicMirror npm install -
pi@raspberrypi:~/MagicMirror $ npm install > magicmirror@2.8.0 install /home/pi/MagicMirror > cd vendor && npm install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) audited 220 packages in 21.352s found 5 vulnerabilities (4 low, 1 high) run `npm audit fix` to fix them, or `npm audit` for details > magicmirror@2.8.0 postinstall /home/pi/MagicMirror > sh installers/postinstall/postinstall.sh && npm run install-fonts MagicMirror installation successful! > magicmirror@2.8.0 install-fonts /home/pi/MagicMirror > cd fonts && npm install audited 1 package in 1.151s found 0 vulnerabilities audited 3592 packages in 97.711s found 0 vulnerabilities pi@raspberrypi:~/MagicMirror $Looks good. What should I do next?, Try to start the mirror?
-
@Gomalley yes, start it up
-
@sdetweil I was able to start up he mirror by doing
cd ~ /MagicMirror npm startThe mirror started up like usual but it didn’t restart after I exited out of it.
-
@Gomalley ok, now try
pm2 listIf something is there, try
pm2 start ???Where name is whatever was shown
If nothing, use my new script, see link in troubleshooting section
-
pm2 listgave me error messages so I ran the updated script and keeps coming up with an error for shelljs
pi@raspberrypi:~ $ pm2 list [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2 internal/modules/cjs/loader.js:583 throw err; ^ Error: Cannot find module 'shelljs' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (/usr/local/lib/node_modules/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) at module.exports.Client.launchDaemon (/usr/local/lib/node_modules/pm2/lib/Client.js:244:7) at /usr/local/lib/node_modules/pm2/lib/Client.js:103:10 at /usr/local/lib/node_modules/pm2/lib/Client.js:311:14 at process._tickCallback (internal/process/next_tick.js:61:11) pi@raspberrypi:~ $ bash -c "$(curl -sL https://www.dropbox.com/s/cy2z7lbkpifcbrk/fixuppm2.sh?dl=0)" bash: line 26: 1: command not found internal/modules/cjs/loader.js:583 throw err; ^ Error: Cannot find module 'shelljs' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (/usr/local/lib/node_modules/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) at module.exports.Client.launchDaemon (/usr/local/lib/node_modules/pm2/lib/Client.js:244:7) at /usr/local/lib/node_modules/pm2/lib/Client.js:103:10 at /usr/local/lib/node_modules/pm2/lib/Client.js:311:14 at process._tickCallback (internal/process/next_tick.js:61:11) internal/modules/cjs/loader.js:583 throw err; ^ Error: Cannot find module 'shelljs' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (/usr/local/lib/node_modules/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) at detectInitSystem (/usr/local/lib/node_modules/pm2/lib/API/Startup.js:50:11) at API.CLI.startup (/usr/local/lib/node_modules/pm2/lib/API/Startup.js:186:27) at Command.<anonymous> (/usr/local/lib/node_modules/pm2/bin/pm2:705:9) at Command.listener (/usr/local/lib/node_modules/pm2/node_modules/commander/index.js:315:8) at Command.emit (events.js:189:13) at Command.parseArgs (/usr/local/lib/node_modules/pm2/node_modules/commander/index.js:651:12) [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2 internal/modules/cjs/loader.js:583 throw err; ^ Error: Cannot find module 'shelljs' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (/usr/local/lib/node_modules/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) at module.exports.Client.launchDaemon (/usr/local/lib/node_modules/pm2/lib/Client.js:244:7) at /usr/local/lib/node_modules/pm2/lib/Client.js:103:10 at /usr/local/lib/node_modules/pm2/lib/Client.js:311:14 at process._tickCallback (internal/process/next_tick.js:61:11) [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2 internal/modules/cjs/loader.js:583 throw err; ^ Error: Cannot find module 'shelljs' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (/usr/local/lib/node_modules/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) at module.exports.Client.launchDaemon (/usr/local/lib/node_modules/pm2/lib/Client.js:244:7) at /usr/local/lib/node_modules/pm2/lib/Client.js:103:10 at /usr/local/lib/node_modules/pm2/lib/Client.js:311:14 at process._tickCallback (internal/process/next_tick.js:61:11) pi@raspberrypi:~ $I’ve run into this “cannot find shelljs” error before
-
@sdetweil
Is it possibly the version of raspbian that is messing this up because it use to work before they released the latest version of raspbian and before MM 2.8 as well. -
@Gomalley pm2 needs to be reinstalled, cause the npm version changed.
lets try my new pm2 fixup script…
bash -c "$(curl -sL https://www.dropbox.com/s/cy2z7lbkpifcbrk/fixuppm2.sh?dl=0)"I’ve added your problems to the list it handles
-
@sdetweil
Thank you! The mirror now autostarts!
So all this time I was doing it on a Lexar micro sd card. It actually froze on the startup page so I threw in a 16gb Ultra sandisk amd started the process all over.
Heres the steps that I followed:pm2 logsnpm i -g npmcd ~ sudo chown -R pi .pm2 logsnpm i -g npmsudo npm i -g npmcd ~/MagicMirror npm installpm2 listbash -c "$(curl -sL https://www.dropbox.com/s/cy2z7lbkpifcbrk/fixuppm2.sh?dl=0)"Thank you again for your help!
-
@Gomalley glad that it’s working.
My new installer might have avoided all the rework after git clone -
Hi,
I am having the exact same problem: Black screen after 2.8 update. I followed all the suggestions you two came up with but my screen remains black.
This is what I get after npm start:
Starting MagicMirror: v2.8.0 Loading config ... Loading module helpers ... WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'node_helper' Loading module helpers ... App threw an error during load Error: Cannot find module 'node_helper' at Module._resolveFilename (internal/modules/cjs/loader.js:602:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (internal/modules/cjs/loader.js:528:25) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:6:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:94:3) at Module._compile (internal/modules/cjs/loader.js:711:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) Whoops! There was an uncaught exception... { Error: Cannot find module 'node_helper' at Module._resolveFilename (internal/modules/cjs/loader.js:602:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (internal/modules/cjs/loader.js:528:25) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:6:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:94:3) at Module._compile (internal/modules/cjs/loader.js:711:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) code: 'MODULE_NOT_FOUND' } MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues Launching application. ^Cpi@raspberrypi:~/MagicMirror $ pi@raspberrypi:~/MagicMirror $ npm stop npm ERR! missing script: stop npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2019-08-08T12_50_44_769Z-debug.log pi@raspberrypi:~/MagicMirror $ pm2 stop mm [PM2] Applying action stopProcessId on app [mm](ids: 0) [PM2] [mm](0) ✓ ┌─────────────┬────┬──────┬─────────┬───┬─────┬────────┐ │ Name │ id │ mode │ status │ ↺ │ cpu │ memory │ ├─────────────┼────┼──────┼─────────┼───┼─────┼────────┤ │ MagicMirror │ 1 │ fork │ stopped │ 0 │ 0% │ 0 B │ │ mm │ 0 │ fork │ stopped │ 1 │ 0% │ 0 B │ └─────────────┴────┴──────┴─────────┴───┴─────┴────────┘ Use `pm2 show <id|name>` to get more details about an app pi@raspberrypi:~/MagicMirror $ pm2 list ┌─────────────┬────┬──────┬─────────┬───┬─────┬────────┐ │ Name │ id │ mode │ status │ ↺ │ cpu │ memory │ ├─────────────┼────┼──────┼─────────┼───┼─────┼────────┤ │ MagicMirror │ 1 │ fork │ stopped │ 0 │ 0% │ 0 B │ │ mm │ 0 │ fork │ stopped │ 1 │ 0% │ 0 B │ └─────────────┴────┴──────┴─────────┴───┴─────┴────────┘ Use `pm2 show <id|name>` to get more details about an app pi@raspberrypi:~/MagicMirror $ pm2 start MagicMirror [PM2] Applying action restartProcessId on app [MagicMirror](ids: 1) [PM2] [MagicMirror](1) ✓ [PM2] Process successfully started ┌─────────────┬────┬──────┬─────────┬───┬─────┬──────────┐ │ Name │ id │ mode │ status │ ↺ │ cpu │ memory │ ├─────────────┼────┼──────┼─────────┼───┼─────┼──────────┤ │ MagicMirror │ 1 │ fork │ online │ 0 │ 0% │ 2.5 MB │ │ mm │ 0 │ fork │ stopped │ 1 │ 0% │ 0 B │ └─────────────┴────┴──────┴─────────┴───┴─────┴──────────┘ Use `pm2 show <id|name>` to get more details about an app pi@raspberrypi:~/MagicMirror $ npm start > magicmirror@2.8.0 start /home/pi/MagicMirror > sh run-start.sh Starting MagicMirror: v2.8.0 Loading config ... Loading module helpers ... WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'node_helper' Loading module helpers ... App threw an error during load Error: Cannot find module 'node_helper' at Module._resolveFilename (internal/modules/cjs/loader.js:602:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (internal/modules/cjs/loader.js:528:25) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:6:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:94:3) at Module._compile (internal/modules/cjs/loader.js:711:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) Whoops! There was an uncaught exception... { Error: Cannot find module 'node_helper' at Module._resolveFilename (internal/modules/cjs/loader.js:602:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (internal/modules/cjs/loader.js:528:25) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:6:18) at Object.<anonymous> (/home/pi/MagicMirror/modules/default/updatenotification/node_helper.js:94:3) at Module._compile (internal/modules/cjs/loader.js:711:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) code: 'MODULE_NOT_FOUND' } MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues Launching application.I also get the black screen when I start with ‘pm2 MagicMirror’ which was created by @sdetweil script and starting with my original command ‘pm2 start mm’.
Looks really screwed up and since I have to admit that I am a noob I am lost.
Any suggestions? Best, Max
-
weird…
node_helper is a special module provided by MM and part of the install package
can u do
ls ~/MagicMirror/node_modules/node_helper/it should display 1 file, index.js
did u remove the node_modules folder?
ps. I did that once, and had the same problem!try this
cd ~/MagicMirror git checkout -- node_modules/node_helper/index.jsthen try restarting MagicMirror
-
Hi, thank you for your advise.
ls ~/MagicMirror/node_modules/node_helper/shows me
ls: Zugriff auf ‘/home/pi/MagicMirror/node_modules/node_helper/’ nicht möglich: Datei oder Verzeichnis nicht gefunden
File or folder not foundgit checkout -- node_modules/node_helper/index.jsresults in
error: pathspec ‘node_modules/node_helper/index.js’ did not match any file(s) known to git.
-
@maxheartrate ok. I am away from my system now for a couple days.
Try
git checkout -- node_helper/index.jsIf that fails, try
git statusThen rename your MagicMirror folder to something else, clone it again, and copy the node_modules/node_helper folder to your previous installation, and rename the new one, then the old one back
-
Your two suggestions did not work. That is why I followed step 3: cloning MM again and copying node_helper to node_modules.
I ran npm install in node_modules and in the MagicMirror directory.
Now it looks like I got one error further … :flushed_face:
This is what I get now:
> sh run-start.sh Starting MagicMirror: v2.8.0 Loading config ... Loading module helpers ... WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module '../../../js/class.js' Loading module helpers ... App threw an error during load Error: Cannot find module '../../../js/class.js' at Module._resolveFilename (internal/modules/cjs/loader.js:602:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (internal/modules/cjs/loader.js:528:25) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/home/pi/MagicMirror/node_modules/node_helper/index.js:8:13) at Object.<anonymous> (/home/pi/MagicMirror/node_modules/node_helper/index.js:127:3) at Module._compile (internal/modules/cjs/loader.js:711:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) Whoops! There was an uncaught exception... { Error: Cannot find module '../../../js/class.js' at Module._resolveFilename (internal/modules/cjs/loader.js:602:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (internal/modules/cjs/loader.js:528:25) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/home/pi/MagicMirror/node_modules/node_helper/index.js:8:13) at Object.<anonymous> (/home/pi/MagicMirror/node_modules/node_helper/index.js:127:3) at Module._compile (internal/modules/cjs/loader.js:711:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) code: 'MODULE_NOT_FOUND' } MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues Launching application. -
@maxheartrate no. No npm install in the node_modules folder. That messes everything up.
Do
cd ~/MagicMirror rm -rf node_modules cp -R -p ???/node_modules ~/MagicMirrorWhere ??? Is your recently cloned download.
Then in the MagicMirror folder do
npm installIF u had other modules installed, beyond the initial set, then look thru their folders and see if there is a package.json file present. If so, in each such module folder do a
npm installthere
I made a new script to do all this upgrade stuff, but I don’t know what will happen if the git pull is already done.
See my upgrade topic in the troubleshooting section -
Hi @sdetweil, thanks for joining in and for your advise.
I followed your steps just as described. The node_helper was the only module in the newly cloned node_modules folder. I then ran npm install and an npm install in every modules folder with a package.json file.
After that I ran into the missing node_helper error again. Obviously the folder was deleted when I ran the npm install in the MagicMirror folder. Now I copied the node_helper folder from the newly cloned version again and I am back at the error I sent in my previous post. :dizzy_face:
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login