Read the statement by Michael Teeuw here.
Problem with SolarEdgeLite module... please help...
-
Hello everyone, I have problem, after installation the newest version of MagicMirror.
Raspberry Pi 4, fresh sd card, apt update, apt upgrade, and after start magic mirror, nothing happen, and log from pm2 logs show this on red…[2025-01-05 08:44:57.000] [ERROR] (node:4175) UnhandledPromiseRejectionWarning: Error: Cannot find module ‘request’
Require stack:- /home/pi/MagicMirror/modules/MMM-SolarEdgeLite/node_helper.js
- /home/pi/MagicMirror/js/app.js
- /home/pi/MagicMirror/js/electron.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15)
at s._resolveFilename (node:electron/js2c/browser_init:2:120689)
at Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:1058:27)
at c._load (node:electron/js2c/node_init:2:16955)
at Module.require (node:internal/modules/cjs/loader:1318:19)
at require (node:internal/modules/helpers:179:18)
at Object. (/home/pi/MagicMirror/modules/MMM-SolarEdgeLite/node_helper.js:1:17)
at Module._compile (node:internal/modules/cjs/loader:1484:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1564:10)
at Module.load (node:internal/modules/cjs/loader:1295:32)
at Module._load (node:internal/modules/cjs/loader:1111:12)
at c._load (node:electron/js2c/node_init:2:16955)
at Module.require (node:internal/modules/cjs/loader:1318:19)
at require (node:internal/modules/helpers:179:18)
at loadModule (/home/pi/MagicMirror/js/app.js:200:19)
Can anyone help?
Thank You so much
Piotr -
@sdetweil
Thank You for response.This is how i resolve problem with this module (with help of my brother Wojtek :D)
(list of commands)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR=“$HOME/.nvm”
[ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh”
[ -s “$NVM_DIR/bash_completion” ] && . “$NVM_DIR/bash_completion”
nvm install 22.9.0
nvm use 22.9.0
inside MagicMirror folder:
rm -rf node_modules
rm -rf package-lock.json
npm install
npm install request --save
npm start
After this MMM-SolarEdge works perfect
Piotr
-
-
@sdetweil
Thank You for response.This is how i resolve problem with this module (with help of my brother Wojtek :D)
(list of commands)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR=“$HOME/.nvm”
[ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh”
[ -s “$NVM_DIR/bash_completion” ] && . “$NVM_DIR/bash_completion”
nvm install 22.9.0
nvm use 22.9.0
inside MagicMirror folder:
rm -rf node_modules
rm -rf package-lock.json
npm install
npm install request --save
npm start
After this MMM-SolarEdge works perfect
Piotr
-
@osnapus cool, but be ready
because you added request at the MagicMirror folder you have modified the package.json and package-lock.json which will block the next upgrade for MagicMirror
you will have to discard those changes to do the MagicMirror upgrade, but then Solaredge wont work again
you should
npm install request
in the Solaredge module folder
if you use my upgrade script it will ask if you want to keep these changes (no)
but it will fix Solaredge for youyou could run the upgrade script now with force as a parameter instead off apply to cleanup now
next MagicMirror version release is April 1
-