MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    newsfeed error sudden error referenceError: fetch is not defined

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    5 Posts 2 Posters 241 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MMaik100
      last edited by

      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

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @MMaik100
        last edited by

        @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)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          MMaik100 @sdetweil
          last edited by

          @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
          (Use node --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

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @MMaik100
            last edited by

            @MMaik100 do NOT install node manually
            use my install script, it will install the correct version

            OR in the short term edit the package.json file and change the

            ||22 to
            || 23

            but 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

            see
            https://github.com/sdetweil/MagicMirror_scripts

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @sdetweil
              last edited by

              @MMaik100 did you get this working?

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy