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 9.1k 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.
    • V Offline
      Volkae @sdetweil
      last edited by

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

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

      22.14.0
      “version”: “2.30.0”,

      KristjanESPERANTOK S 2 Replies Last reply Reply Quote 0
      • V Offline
        Volkae @KristjanESPERANTO
        last edited by

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

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

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

        I need the system information part from the logs. Like this:

        [2025-01-14 20:05:03.529] [INFO]  System information:
        ### SYSTEM:    manufacturer: Raspberry Pi Foundation; model: Raspberry Pi 4 Model B Rev 1.5; virtual: false
        ### OS:        platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.1.21-v8+
        ### VERSIONS:  electron: 31.2.1; used node: 20.15.0; installed node: 22.4.1; npm: 10.8.1; pm2:
        ### OTHER:     timeZone: Europe/Berlin; ELECTRON_ENABLE_GPU: undefined
        

        Sorry, but I am not sure how to see this informations

        1 Reply Last reply Reply Quote 0
        • KristjanESPERANTOK Offline
          KristjanESPERANTO Module Developer @Volkae
          last edited by KristjanESPERANTO

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

          “version”: “2.30.0”,

          You need to update MagicMirror. The module doesn’t work anymore with MagicMirror version 2.30.0.

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

            @Volkae that means the upgrade didn’t execute
            copy/paste and execute this in a terminal window on the MagicMirror system

            bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)"  apply
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • P Offline
              p1lspeda @p1lspeda
              last edited by

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

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

              Here you go

              [2025-05-06 06:46:30.229] [INFO]  System information:
              ### SYSTEM:   manufacturer: ; model: ; virtual: false
              ### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.12.20+rpt-rpi-v8
              ### VERSIONS: electron: 32.2.7; used node: 22.14.0; installed node: 22.14.0; npm: 10.9.2; pm2: 5.4.3
              ### OTHER:    timeZone: Europe/Berlin; ELECTRON_ENABLE_GPU: undefined
              
              

              Although it is not listed, I am running a Raspberry Pi 4

              pi@magicmirror:~ $ lscpu
              Architecture:             aarch64
                CPU op-mode(s):         32-bit, 64-bit
                Byte Order:             Little Endian
              CPU(s):                   4
                On-line CPU(s) list:    0-3
              Vendor ID:                ARM
                Model name:             Cortex-A72
                  Model:                3
                  Thread(s) per core:   1
                  Core(s) per cluster:  4
                  Socket(s):            -
                  Cluster(s):           1
                  Stepping:             r0p3
                  CPU(s) scaling MHz:   50%
                  CPU max MHz:          1800.0000
                  CPU min MHz:          600.0000
                  BogoMIPS:             108.00
                  Flags:                fp asimd evtstrm crc32 cpuid
              Caches (sum of all):
                L1d:                    128 KiB (4 instances)
                L1i:                    192 KiB (4 instances)
                L2:                     1 MiB (1 instance)
              NUMA:
                NUMA node(s):           1
                NUMA node0 CPU(s):      0-3
              Vulnerabilities:
                Gather data sampling:   Not affected
                Itlb multihit:          Not affected
                L1tf:                   Not affected
                Mds:                    Not affected
                Meltdown:               Not affected
                Mmio stale data:        Not affected
                Reg file data sampling: Not affected
                Retbleed:               Not affected
                Spec rstack overflow:   Not affected
                Spec store bypass:      Vulnerable
                Spectre v1:             Mitigation; __user pointer sanitization
                Spectre v2:             Vulnerable
                Srbds:                  Not affected
                Tsx async abort:        Not affected
              
              S KristjanESPERANTOK 2 Replies Last reply Reply Quote 0
              • S Offline
                sdetweil @p1lspeda
                last edited by sdetweil

                @p1lspeda have you tried the upgrade script?
                I believe the module requires 2.31.0 as a minimum MM version now

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • KristjanESPERANTOK Offline
                  KristjanESPERANTO Module Developer @p1lspeda
                  last edited by

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

                  ### VERSIONS: electron: 32.2.7; used node: 22.14.0; installed node: 22.14.0; npm: 10.9.2; pm2: 5.4.3

                  You still need to upgrade MagicMirror. I recommend the official upgrade process.

                  P 1 Reply Last reply Reply Quote 0
                  • V Offline
                    Volkae
                    last edited by

                    I used the update script again and now MM is 2.31.0
                    MMM-PublicTransportHafas works again, that`s fine, but now MMM-SmartWebDisplay is gone…
                    Not fine…

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

                      @Volkae any errors listed in MagicMirror startup?

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

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

                        @sdetweil
                        Sorry, I don`t know how to show the errors during startup :-(

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

                          @Volkae where does npm start output

                          if using pm2 tge

                          pm2 logs --lines=xxx

                          xxx is the number of most recent lines
                          default 15

                          probably 100 good start
                          note the output comes in 2 parts

                          error and output

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

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

                            @sdetweil
                            Not using pm2
                            using cronjob to start MM

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

                              @Volkae i forgot to mention that the full calendar url
                              is shown
                              i have deleted the other message

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

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

                                @sdetweil
                                Upps,
                                thank you!!!

                                1 Reply Last reply Reply Quote 0
                                • P Offline
                                  p1lspeda @KristjanESPERANTO
                                  last edited by

                                  @KristjanESPERANTO
                                  I’ve upgraded to the latest MM Version

                                  pi@magicmirror:~/MagicMirror $ grep version package.json
                                          "version": "2.31.0-develop",
                                  
                                  [2025-05-07 09:57:22.742] [INFO]  System information:
                                  ### SYSTEM:   manufacturer: ; model: ; virtual: false
                                  ### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.12.20+rpt-rpi-v8
                                  ### VERSIONS: electron: 32.2.7; used node: 22.14.0; installed node: 22.14.0; npm: 10.9.2; pm2: 5.4.3
                                  ### OTHER:    timeZone: Europe/Berlin; ELECTRON_ENABLE_GPU: undefined
                                  
                                  

                                  And I still get this error

                                  [2025-05-07 09:57:19.297] [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.
                                  

                                  My module version:

                                  pi@magicmirror:~/MagicMirror/modules/MMM-PublicTransportHafas $ grep version package.json
                                    "version": "3.1.11",
                                  pi@magicmirror:~/MagicMirror/modules/MMM-PublicTransportHafas $ git pull
                                  Already up to date.
                                  

                                  I do not know what else I can do or what I have missed

                                  mumblebajM karsten13K 2 Replies Last reply Reply Quote 0
                                  • mumblebajM Offline
                                    mumblebaj Module Developer @p1lspeda
                                    last edited by mumblebaj

                                    @p1lspeda

                                    I just done a fresh install of the module and it works fine for me.

                                    3d2ef50a-fc46-4b50-a022-e68df562af4a-image.png

                                    Just out of curiosity, did you do the following steps?

                                    • cd MMM-PublicTransportHafas

                                    • npm ci --omit=dev

                                    @KristjanESPERANTO ) saw the below in the log, I am assuming it is nothing to be concerned about?

                                    b143a15f-aa48-4db3-92dd-a233d9338f80-image.png

                                    Check out my modules at: https://github.com/mumblebaj?tab=repositories
                                    Check my blog-post: https://mumblebaj.xyz/
                                    Check my MM Container: https://hub.docker.com/repository/docker/mumblebaj/magicmirror/general

                                    1 Reply Last reply Reply Quote 1
                                    • karsten13K Offline
                                      karsten13 @p1lspeda
                                      last edited by

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

                                      I’ve upgraded to the latest MM Version

                                      not really, 2.31.0-develop <> 2.31.0

                                      KristjanESPERANTOK 1 Reply Last reply Reply Quote 1
                                      • KristjanESPERANTOK Offline
                                        KristjanESPERANTO Module Developer @karsten13
                                        last edited by KristjanESPERANTO

                                        @p1lspeda How did you perform the MagicMirror update? Please show us the output of git branch when you are in the MagicMirror root directory.

                                        S P 2 Replies Last reply Reply Quote 0
                                        • S Offline
                                          sdetweil @KristjanESPERANTO
                                          last edited by

                                          @KristjanESPERANTO looks like he was on the dev branch for a fix and didn’t use my script to update or follow the instructions I posted

                                          https://forum.magicmirror.builders/topic/19561/version-2.31.0-april-1-2025-upgrade-reminder

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          1 Reply Last reply Reply Quote 0
                                          • P Offline
                                            p1lspeda @KristjanESPERANTO
                                            last edited by

                                            @KristjanESPERANTO
                                            Thanks for your patience,

                                            Edit: did a complete reinstall and now it works. I must have misconfigured something and could not remember what or how.

                                            #############################
                                            This is what I have done:

                                            • I switched to the master branch yesterday and ran @sdetweil 's update script no change
                                            • I’ve done a fresh module install - no change
                                            • I’ve ran @sdetweil 's upgrade script - no change
                                            pi@magicmirror:~/MagicMirror $ git branch
                                              _fix_clipping
                                            * master
                                            pi@magicmirror:~/MagicMirror $ cd modules/MMM-PublicTransportHafas/
                                            pi@magicmirror:~/MagicMirror/modules/MMM-PublicTransportHafas $ npm ci --omit=dev
                                            
                                            > mmm-publictransporthafas@3.1.11 prepare
                                            > [ -f node_modules/.bin/husky ] && husky || echo husky is not installed.
                                            
                                            husky is not installed.
                                            
                                            added 63 packages, and audited 64 packages in 20s
                                            
                                            19 packages are looking for funding
                                              run `npm fund` for details
                                            
                                            found 0 vulnerabilities
                                            pi@magicmirror:~/MagicMirror/modules/MMM-PublicTransportHafas $
                                            pi@magicmirror:~/MagicMirror $ grep version package.json
                                                    "version": "2.31.0",
                                            

                                            Here’s my config.js

                                                            {
                                                                    module: "MMM-PublicTransportHafas",
                                                                    position: "top_right",
                                                                    config: {
                                                                            stationID: "000405041",                   // Replace with your stationID!
                                                                            stationName: "Höfchen/Listmann",   // Replace with your station name!
                                                                            direction: "",                    // Show only departures heading to this station. (A station ID.)
                                                                            ignoredLines: [],                 // Which lines should be ignored? (comma-separated list of line names)
                                                                            excludedTransportationTypes: [],  // Which transportation types should not be shown on the mirror? (comma-separated list of types) possible values: StN for >
                                                                            timeToStation: 10,                // How long do you need to walk to the next Station?
                                                                            showColoredLineSymbols: true,     // Want colored line symbols?
                                                                            useColorForRealtimeInfo: true,    // Want colored real time information (timeToStation, early)?
                                                                            showTableHeadersAsSymbols: true,  // Table Headers as symbols or text?
                                                                            maxUnreachableDepartures: 0,      // How many unreachable departures should be shown?
                                                                            maxReachableDepartures: 10,        // How many reachable departures should be shown?
                                                                            customLineStyles: "",             // Prefix for the name of the custom css file. ex: Leipzig-lines.css (case sensitive)
                                                                            showOnlyLineNumbers: false        // Display only the line number instead of the complete name, i. e. "11" instead of "STR 11"
                                                                             }
                                                            },
                                            
                                            

                                            The error still occurs.
                                            At this point I’m completely clueless

                                            S 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • 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