Read the statement by Michael Teeuw here.
Error on update to MM 2.11.0
-
Dear all,
after a long time I want to restart my not-finished-yet project.
So I pluged in the cables to my raspberry pi logged into it via remotecontrol. I updated and upgraded my pi and afterwards I git pulled the MM.Till then I can´t start the MM because of the following error.
pi@raspberrypi:~/MagicMirror $ npm start > magicmirror@2.11.0 start /home/pi/MagicMirror > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js App threw an error during load Error: Cannot find module 'logger' Require stack: - /home/pi/MagicMirror/js/app.js - /home/pi/MagicMirror/js/electron.js - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js - at Module._resolveFilename (internal/modules/cjs/loader.js:627:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) at Function.Module._load (internal/modules/cjs/loader.js:531:27) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:13:13) at Module._compile (internal/modules/cjs/loader.js:786:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) A JavaScript error occurred in the main process Uncaught Exception: Error: Cannot find module 'logger' Require stack: - /home/pi/MagicMirror/js/app.js - /home/pi/MagicMirror/js/electron.js - /home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js - at Module._resolveFilename (internal/modules/cjs/loader.js:627:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:41:16) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) at Function.Module._load (internal/modules/cjs/loader.js:531:27) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:13:13) at Module._compile (internal/modules/cjs/loader.js:786:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32)
Does anyone know what I an do to fix my problem?
Thanks in advance and best wishes from Germany
Daniel
-
-
@killing-joke said in Error on update to MM 2.11.0:
I git pulled the MM.
AND did an npm install
correct?(I wish u had used my upgrade script)
see https://github.com/sdetweil/MagicMirror_scripts -
@sdetweil
thanks for the very quick reply.I don´t know, but when I try to start the MM with “npm start” the following error occurs which let me think it didn´t installed it properly?!
pi@raspberrypi:~ $ npm start npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /home/pi/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2021-11-14T17_51_18_189Z-debug.log pi@raspberrypi:~ $
If my MM works again, I will definitly use your script to update it in the future. ;-)
Best Regards from Germany
Daniel
-
@killing-joke you have to be in the MagicMirror folder to do npm start… you are in the users (pi) root
cd MagicMirror
npm start -
@sdetweil
I could facepalm me so hard for my last post since I want to hurry up my own post.
Anyway, of course i have to be in the MM folder. but then it occurs the error which i wrote in my first code.
How can I check the status of my npm? -
npm -v
node -v -
@sdetweil
npm version 6.14.5
node version 9.11.2 -
-
@killing-joke no… that won’t do…
best thing is to run my upgrade script
see https://github.com/sdetweil/MagicMirror_scripts
and use force, instead of apply (because u already have the mm code pulled down)
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply
-
@sdetweil
I “git pulled” it in my MM folder but I didn´t installed npm again. I thought it is independent from the MM.
installed it again know but following occurspi@raspberrypi:~/MagicMirror $ npm install > magicmirror@2.11.0 install /home/pi/MagicMirror > echo "Installing vendor files ... " && cd vendor && npm install --loglevel=error Installing vendor files ... > @fortawesome/fontawesome-free@5.15.4 postinstall /home/pi/MagicMirror/vendor/node_modules/@fortawesome/fontawesome-free > node attribution.js Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) added 1 package from 1 contributor, removed 74 packages, updated 5 packages and audited 9 packages in 11.012s found 0 vulnerabilities > magicmirror@2.11.0 postinstall /home/pi/MagicMirror > npm run install-fonts && echo "MagicMirror installation finished successfully! " > magicmirror@2.11.0 install-fonts /home/pi/MagicMirror > echo "Installing fonts ... " && cd fonts && npm install --loglevel=error Installing fonts ... updated 1 package and audited 1 package in 2.515s found 0 vulnerabilities MagicMirror installation finished successfully! audited 1172 packages in 61.47s 70 packages are looking for funding run `npm fund` for details found 88 vulnerabilities (4 low, 42 moderate, 40 high, 2 critical) run `npm audit fix` to fix them, or `npm audit` for details
afterwards the same error occurs as in the first post described.