Read the statement by Michael Teeuw here.
Cannot find module "moment"
-
@sdetweil
Now another module give an error0|MagicMir | [26.07.2021 00:57.11.255] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'uuid/v4' 0|MagicMir | [26.07.2021 00:57.11.503] [ERROR] Whoops! There was an uncaught exception... 0|MagicMir | [26.07.2021 00:57.11.562] [ERROR] { Error: Cannot find module 'uuid/v4' 0|MagicMir | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) 0|MagicMir | at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) 0|MagicMir | at Function.Module._load (internal/modules/cjs/loader.js:562:25) 0|MagicMir | at Module.require (internal/modules/cjs/loader.js:692:17) 0|MagicMir | at require (internal/modules/cjs/helpers.js:25:18) 0|MagicMir | at Object.<anonymous> (/home/pi/MagicMirror/node_modules/request/lib/auth.js:4:12) 0|MagicMir | at Module._compile (internal/modules/cjs/loader.js:778:30) 0|MagicMir | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) 0|MagicMir | at Module.load (internal/modules/cjs/loader.js:653:32) 0|MagicMir | at tryModuleLoad (internal/modules/cjs/loader.js:593:12) code: 'MODULE_NOT_FOUND' } 0|MagicMir | [26.07.2021 00:57.11.573] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 0|MagicMir | [26.07.2021 00:57.11.584] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues /home/pi/.pm2/logs/MagicMirror-out.log last 15 lines: 0|MagicMir | [26.07.2021 00:57.08.308] [LOG] Module helper loaded: newsfeed 0|MagicMir | [26.07.2021 00:57.11.270] [LOG] Loading module helpers ... 0|MagicMir | [26.07.2021 00:57.11.284] [LOG] No helper found for module: alert. 0|MagicMir | [26.07.2021 00:57.11.294] [LOG] Initializing new module helper ... 0|MagicMir | [26.07.2021 00:57.11.307] [LOG] Module helper loaded: updatenotification 0|MagicMir | [26.07.2021 00:57.11.316] [LOG] No helper found for module: clock. 0|MagicMir | [26.07.2021 00:57.11.330] [LOG] Initializing new module helper ... 0|MagicMir | [26.07.2021 00:57.11.340] [LOG] Module helper loaded: calendar 0|MagicMir | [26.07.2021 00:57.11.355] [LOG] Initializing new module helper ... 0|MagicMir | [26.07.2021 00:57.11.361] [LOG] Module helper loaded: currentweather 0|MagicMir | [26.07.2021 00:57.11.372] [LOG] Initializing new module helper ... 0|MagicMir | [26.07.2021 00:57.11.382] [LOG] Module helper loaded: weatherforecast 0|MagicMir | [26.07.2021 00:57.11.396] [LOG] Initializing new module helper ... 0|MagicMir | [26.07.2021 00:57.11.405] [LOG] Module helper loaded: newsfeed 0|MagicMir | Starting chromium browser now, have patience, it takes a minute
Internet is fine.
Package.json
-
@uok825 said in Cannot find module "moment":
/home/pi/MagicMirror/node_modules/request/lib/auth.js
looks like a library under request
cd ~/MagicMirror npm install uuid
-
request and any lib that used request was removed in 2.16 as there was a security problem never to be fixed… so module was deprecated (set end of life)
MagicMirror removed
-
but the internet is working!!
-
@sdetweil Yeah. I also solved the other Raspberry and I know how to solve it here. We would try less if I don’t realize later. I’m sorry to have been ranting. I’m currently installing Uuid if the problem I will write again. Thanks for your labor Sam.
-
@uok825 to shorten the path
pm2 stop all
then do
npm start
in the MagicMirror folder
alt-spacebar, n to minimize MM
then ctrl-c to stoponce good, then pm2 status to get the number and
pm2 start 0 or whatever number -
@sdetweil I am connected with SSH. I always did pm2 stop 0, pm2 flush, do my work and pm2 start 0. But PI0 is so slow still doing npm :D
-
@uok825 but don’t need to do pm2 start until its working correctly
why do you post screen shots if connected via ssh?/ just copy the text…
-
@uok825 pm2 calls npm same thing…
-
@sdetweil Screenshot is a habit for me to take. easier than copying