• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MMM-PublicTransportHafas - Error when loading - DeparturFetcher.mjs

Scheduled Pinned Locked Moved Unsolved Troubleshooting
43 Posts 7 Posters 4.2k Views 7 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.
  • K Offline
    KristjanESPERANTO Module Developer @Vulan12354
    last edited by May 2, 2025, 12:29 PM

    @Vulan12354 I think it is probably because of the node version. Which version are you using? Run node -v to find out. And it would also be interesting to know which MagicMirror version you are using.

    V 1 Reply Last reply May 2, 2025, 7:19 PM Reply Quote 0
    • V Offline
      Volkae @KristjanESPERANTO
      last edited by May 2, 2025, 7:19 PM

      @KristjanESPERANTO
      The same problem on my MM. I did all the updates without any problems but since the last update the module does not work.
      node is v20.19.1
      MM is 2.30.0

      K 1 Reply Last reply May 3, 2025, 12:09 AM Reply Quote 0
      • K Offline
        KristjanESPERANTO Module Developer @Volkae
        last edited by May 3, 2025, 12:09 AM

        @Volkae said in MMM-PublicTransportHafas - Error when loading - DeparturFetcher.mjs:

        MM is 2.30.0

        Okay, I can see this when I downgrade to 2.30.0. With 2.31.0 the issue doesn’t appear. That was not the plan, but I’ll adjust requiresVersion accordingly.

        Please update MM and check whether this solves the issue for you 🙂

        S M 2 Replies Last reply May 3, 2025, 12:54 AM Reply Quote 0
        • S Offline
          sdetweil @KristjanESPERANTO
          last edited by May 3, 2025, 12:54 AM

          @Volkae note that you have to update nodejs again this release

          use my upgrade script it does all the work
          same place as the install script

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          V 1 Reply Last reply May 4, 2025, 7:28 PM Reply Quote 0
          • M Offline
            mumblebaj Module Developer @KristjanESPERANTO
            last edited by May 3, 2025, 8:04 AM

            @KristjanESPERANTO Not sure if it is advisable to update the modules requiresVersion to the latest MM version. With the issue of older PI’s not able to run the latest version of MM you run the risk of the modules no longer working even if they can still work on older versions of MM. I prefer to keep my version 2 versions behind as they worked on those. Unless your module has specifically been updated with dependencies of the latest MM.

            Check out my modules at: https://github.com/mumblebaj?tab=repositories

            1 Reply Last reply Reply Quote 1
            • P Offline
              p1lspeda
              last edited by May 4, 2025, 6:20 PM

              Hi,
              I can confirm: I have the same issue.
              Updated to latest node and MM version.
              Did a npm -install after updating MM and node. Unfortunately it did not have an effect.

              Any tips ?

              Error message:
              [2025-05-04 20:17:43.557] [ERROR] Error when loading MMM-PublicTransportHafas: require() of ES Module /home/pi/MagicMirror/modules/MMM-PublicTransportHafas/core/DepartureFetcher.mjs not supported. Instead change the require of /home/pi/MagicMirror/modules/MMM-PublicTransportHafas/core/DepartureFetcher.mjs to a dynamic import() which is available in all CommonJS modules.

              S 1 Reply Last reply May 4, 2025, 7:43 PM Reply Quote 0
              • V Offline
                Volkae @sdetweil
                last edited by May 4, 2025, 7:28 PM

                @sdetweil
                I used your upgrade script, update is completed, made an new install from MMM-PublicTransportHafas but it does not work

                S 2 Replies Last reply May 4, 2025, 7:41 PM Reply Quote 0
                • S Offline
                  sdetweil @Volkae
                  last edited by May 4, 2025, 7:41 PM

                  @Volkae ok, did you do the apply ?

                  do

                  node -v
                  cd ~/MagicMirror 
                  grep version package.json
                  

                  MagicMirror version should be 2.31.0

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  V 1 Reply Last reply May 6, 2025, 7:21 AM Reply Quote 1
                  • S Offline
                    sdetweil @p1lspeda
                    last edited by sdetweil May 5, 2025, 12:54 PM May 4, 2025, 7:43 PM

                    @p1lspeda just fyi, if you use the upgrade script it will npm install all the modules that have a package.json with dependencies after completing the MagicMirror upgrade

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 1
                    • S Offline
                      sdetweil @Volkae
                      last edited by May 4, 2025, 7:47 PM

                      @Volkae @p1lspeda @KristjanESPERANTO will have to advise next steps

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      K 1 Reply Last reply May 5, 2025, 3:28 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 1 / 5
                      1 / 5
                      • First post
                        7/43
                        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