Read the statement by Michael Teeuw here.
Cannot find module '#server_functions'
-
-
chris@MagicPi:~/MagicMirror $ git diff package.json diff --git a/package.json b/package.json index 5ab033c9..c6889623 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "@fortawesome/fontawesome-free": "^7.0.1", "ajv": "^8.17.1", "animate.css": "^4.1.1", + "axios": "^1.12.2", "console-stamp": "^3.1.2", "croner": "^9.1.0", "envsub": "^4.1.0", chris@MagicPi:~/MagicMirror $ -
#server_functionsis an alias forjs/server_functions.jswhich is defined inpackage.json:"imports": { "#module_functions": { "default": "./js/module_functions.js" }, "#server_functions": { "default": "./js/server_functions.js" } },Because axios is the only diff your
package.jsonshould contain above lines.I have no idea anymore (maybe corrupt sd card).
-
@chrisfr1976 can you do
Stop MagicMirror
cd -/MagicMirror rm -rf node_modules npm installStart MagicMirror
npm startAlso, can you send me the
~/MagicMirror/installers/upgrade.logMy email is same user id as here, at gmail
-
I don’t see that error in my test of npm run server.
-
@sdetweil and @karsten13, I think I solved my problem.
In the beginning when I used the update script it stopped with the node-version but didn’t update. So I updated manually by using the original code from Node JS. So I installed node v22.20.0. Later I went again down to v22.18.0. Maybe this caused some trouble. But Maybe not.rm -rf node_modulesandnpm installI did already 3 times before.But now I modified the
calendarfetcher.jsandnewsfeedfetcher.js:This was removed:
const { getUserAgent } = require("#server_functions"); const { scheduleTimer } = require("#module_functions");and replaced by this:
const getUserAgent = () => "MagicMirror v2.33.0"; const scheduleTimer = (timerRef, interval, callback) => { clearTimeout(timerRef); return setTimeout(callback, interval); };No errors and Calendar/Newsfeed is displayed as before. I don’t know exactly if there are any new issues now but so far I’m happy.
-
@chrisfr1976 I’d really like to see the upgrade.log file
~/MagicMirror/installers/upgrade.logEmail to Me , same userid as here at gmail
-
@sdetweil Hey, no problem generally but I‘m out until Thursday. I‘ll send it then.
-
@chrisfr1976 when you have time
