Read the statement by Michael Teeuw here.
newsfeed error sudden error referenceError: fetch is not defined
-
Re: newsfeed
I now get this error when it boots up:
[2024-11-04 16:38:12.329] [ERROR] Whoops! There was an uncaught exception…
[2024-11-04 16:38:12.336] [ERROR] ReferenceError: fetch is not defined
at fetchNews (/home/adam/MagicMirror/modules/default/newsfeed/newsfeedfetcher.js:110:3)
at NewsfeedFetcher.startFetch (/home/adam/MagicMirror/modules/default/newsfeed/newsfeedfetcher.js:153:3)
at Class.createFetcher (/home/adam/MagicMirror/modules/default/newsfeed/node_helper.js:65:11)
at Class.socketNotificationReceived (/home/adam/MagicMirror/modules/default/newsfeed/node_helper.js:15:9)
at Socket. (/home/adam/MagicMirror/js/node_helper.js:91:10)
at Socket.onevent (/home/adam/MagicMirror/node_modules/socket.io/dist/socket.js:462:26)
at Socket._onpacket (/home/adam/MagicMirror/node_modules/socket.io/dist/socket.js:430:22)
at /home/adam/MagicMirror/node_modules/socket.io/dist/client.js:214:24
at processTicksAndRejections (node:internal/process/task_queues:78:11)
[2024-11-04 16:38:12.337] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[2024-11-04 16:38:12.338] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues -
@MMaik100 looks like your MagicMirror update did not complete
you must run npm install or npm run install-mm after the git pull (which also has to succeed)
-
@sdetweil said in newsfeed error sudden error referenceError: fetch is not defined:
npm install
I ended up rebuilding the whole system. Now I cant run the install successfully:
adam@skylabRPi32:~/MagicMirror $ npm install
(node:8700) ExperimentalWarning: CommonJS module /usr/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /usr/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Usenode --trace-warnings ...
to show where the warning was created)
npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: magicmirror@2.29.0
npm error notsup Not compatible with your version of node/npm: magicmirror@2.29.0
npm error notsup Required: {“node”:“>=20.9.0 <21 || 22”}
npm error notsup Actual: {“npm”:“10.9.0”,“node”:“v23.1.0”}
npm error A complete log of this run can be found in: /home/adam/.npm/_logs/2024-11-07T03_56_11_278Z-debug-0.log -
@MMaik100 do NOT install node manually
use my install script, it will install the correct versionOR in the short term edit the package.json file and change the
||22 to
|| 23but you have to remember you did it, cause next update will complain about the changed file.
OR my upgrade script will let you forget thot change next time
-
@MMaik100 did you get this working?