Read the statement by Michael Teeuw here.
After update 2.23.0 crash
-
After the update.
error at reboot
pi@raspberrypi:~/MagicMirror $ npm start > magicmirror@2.23.0 start > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js App threw an error during load Error: Cannot find module 'envsub' 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 (node:internal/modules/cjs/loader:963:15) at n._resolveFilename (node:electron/js2c/browser_init:2:109416) at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) at Module._load (node:internal/modules/cjs/loader:811:27) at f._load (node:electron/js2c/asar_bundle:2:13328) at Module.require (node:internal/modules/cjs/loader:1035:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:13:16) at Module._compile (node:internal/modules/cjs/loader:1141:14) at Module._extensions..js (node:internal/modules/cjs/loader:1196:10) A JavaScript error occurred in the main process Uncaught Exception: Error: Cannot find module 'envsub' 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 (node:internal/modules/cjs/loader:963:15) at n._resolveFilename (node:electron/js2c/browser_init:2:109416) at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29) at Module._load (node:internal/modules/cjs/loader:811:27) at f._load (node:electron/js2c/asar_bundle:2:13328) at Module.require (node:internal/modules/cjs/loader:1035:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:13:16) at Module._compile (node:internal/modules/cjs/loader:1141:14) at Module._extensions..js (node:internal/modules/cjs/loader:1196:10) MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to retrieve device information MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:\$${ORIGIN}/dri:/usr/lib/dri) failed to load driver: kms_swrast MESA-LOADER: failed to open swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:\$${ORIGIN}/dri:/usr/lib/dri) failed to load swrast driverPlease help
-
@JerryP how did you update?
-
-
pi@raspberrypi:~/MagicMirror $ sudo git pull -
@JerryP AND then npm install after, yes??
the doc says
git pull && npm run install-mmyou don’t use my upgrade script?
-
@sdetweil ```
pi@raspberrypi:~/MagicMirror $ npm startmagicmirror@2.23.0 start
DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.jsApp threw an error during load
Error: Cannot find module ‘envsub’
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 (node:internal/modules/cjs/loader:963:15)
at n._resolveFilename (node:electron/js2c/browser_init:2:109416)
at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:811:27)
at f._load (node:electron/js2c/asar_bundle:2:13328)
at Module.require (node:internal/modules/cjs/loader:1035:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/home/pi/MagicMirror/js/app.js:13:16)
at Module._compile (node:internal/modules/cjs/loader:1141:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1196:10)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module ‘envsub’
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 (node:internal/modules/cjs/loader:963:15)
at n._resolveFilename (node:electron/js2c/browser_init:2:109416)
at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:811:27)
at f._load (node:electron/js2c/asar_bundle:2:13328)
at Module.require (node:internal/modules/cjs/loader:1035:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/home/pi/MagicMirror/js/app.js:13:16)
at Module._compile (node:internal/modules/cjs/loader:1141:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1196:10)
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:$${ORIGIN}/dri:/usr/lib/dri)
failed to load swrast driver
-
@JerryP do
npm installwe’ve updated a bunch of dependencies for this release, you have to install them
-
Don’t want to hijack but didn’t want to create another thread. MM doesn’t run after upgrade with this error. I think it is related to MMM-PGA module but not sure what changed as dev window won’t run either.
[04.04.2023 16:29.46.158] [ERROR] (node:11188) UnhandledPromiseRejectionWarning: Error: Cannot find module 'jsdom' Require stack: -
@sdetweil ```
Already up to date.magicmirror@2.23.0 install-mm
npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=devnpm WARN config only Use
--omit=devto omit dev dependencies from the install.
npm ERR! code EACCES
npm ERR! syscall open
npm ERR! path /home/pi/MagicMirror/package-lock.json
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, open ‘/home/pi/MagicMirror/package-lock.json’
npm ERR! [Error: EACCES: permission denied, open ‘/home/pi/MagicMirror/package-lock.json’] {
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘open’,
npm ERR! path: ‘/home/pi/MagicMirror/package-lock.json’
npm ERR! }
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.npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2023-04-04T20_38_11_536Z-debug-0.log -
@swvalenti yes, there is no package.json describing the dependencies…
some of the local add on scripts use request and jsdom and others…
-
@JerryP said in After update 2.23.0 crash:
/home/pi/MagicMirror/package-lock.json
erase that file… seems u might have used sudo at some time before …
sudo rm /home/pi/MagicMirror/package-lock.json
then npm install again
-
@sdetweil said in After update 2.23.0 crash:
@swvalenti yes, there is no package.json describing the dependencies…
some of the local add on scripts use request and jsdom and others…
So I should revert back to 2.22 then?
-
pi@raspberrypi:~/MagicMirror $ ls CHANGELOG.md Collaboration.md core 'DISPLAY=:0' index.html jest.config.js jsconfig.json magicmirror@2.23.0 module-types.ts oud run-start.sh splashscreen th.json vendor clientonly config css fonts installers js LICENSE.md modules node_modules README.md serveronly tests translations pi@raspberrypi:~/MagicMirror $ npm install npm ERR! code ENOTEMPTY npm ERR! syscall rename npm ERR! path /home/pi/MagicMirror/node_modules/acorn npm ERR! dest /home/pi/MagicMirror/node_modules/.acorn-pnTZ3fig npm ERR! errno -39 npm ERR! ENOTEMPTY: directory not empty, rename '/home/pi/MagicMirror/node_modules/acorn' -> '/home/pi/MagicMirror/node_modules/.acorn-pnTZ3fig' npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2023-04-04T20_43_20_803Z-debug-0.log -
@swvalenti no, i think you got bit by the security cleanup
if a package is not listed in the (any) dependencies and you run npm install it will be removed…
so, go thru the requires in the .js files and do this for each one
https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later
-
-
@sdetweil same error
pi@raspberrypi:~/MagicMirror $ rm -rf node_modules pi@raspberrypi:~/MagicMirror $ npm install npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /home/pi/MagicMirror/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/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/2023-04-04T20_47_07_273Z-debug-0.log pi@raspberrypi:~/MagicMirror $ -
@JerryP looks like u got carried away with sudo rm /home/pi/MagicMirror/package-lock.json (notice the -lock)
and deleted the package.json
git checkout package.json
and npm install again
-
@JerryP said in After update 2.23.0 crash:
pi@raspberrypi:~/MagicMirror $ ls CHANGELOG.md Collaboration.md core 'DISPLAY=:0' index.html jest.config.js jsconfig.json magicmirror@2.23.0 module-types.ts oud run-start.sh splashscreen th.json vendor clientonly config css fonts installers js LICENSE.md modules node_modules README.md serveronly tests translations pi@raspberrypi:~/MagicMirror $ npm install npm ERR! code ENOTEMPTY npm ERR! syscall rename npm ERR! path /home/pi/MagicMirror/node_modules/acorn npm ERR! dest /home/pi/MagicMirror/node_modules/.acorn-pnTZ3fig npm ERR! errno -39 npm ERR! ENOTEMPTY: directory not empty, rename '/home/pi/MagicMirror/node_modules/acorn' -> '/home/pi/MagicMirror/node_modules/.acorn-pnTZ3fig' npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2023-04-04T20_43_20_803Z-debug-0.logThat didn’t work, no worries I will revert
-
@swvalenti what didn’t work?
u are supposed to be doing the npm install of the missing libs in the module (MMM-PGA) folder
i don’t think revert will help, the undocumented libraries were deleted by npm… not us
that .acorn file needs to be deleted
-
@swvalenti said in After update 2.23.0 crash:
@JerryP said in After update 2.23.0 crash:
pi@raspberrypi:~/MagicMirror $ ls CHANGELOG.md Collaboration.md core 'DISPLAY=:0' index.html jest.config.js jsconfig.json magicmirror@2.23.0 module-types.ts oud run-start.sh splashscreen th.json vendor clientonly config css fonts installers js LICENSE.md modules node_modules README.md serveronly tests translations pi@raspberrypi:~/MagicMirror $ npm install npm ERR! code ENOTEMPTY npm ERR! syscall rename npm ERR! path /home/pi/MagicMirror/node_modules/acorn npm ERR! dest /home/pi/MagicMirror/node_modules/.acorn-pnTZ3fig npm ERR! errno -39 npm ERR! ENOTEMPTY: directory not empty, rename '/home/pi/MagicMirror/node_modules/acorn' -> '/home/pi/MagicMirror/node_modules/.acorn-pnTZ3fig' npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2023-04-04T20_43_20_803Z-debug-0.logThat didn’t work, no worries I will revert
The package.json showed no issue with that command. It worked when I reverted no issue.
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