• 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.

Error with node fetch for calendar on fresh install

Scheduled Pinned Locked Moved Solved Troubleshooting
10 Posts 3 Posters 1.1k Views 3 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.
  • L Offline
    landaisbenj
    last edited by Jan 23, 2022, 10:51 AM

    Hello.

    After update, most of module cause some trouble from start. So, black screen…

    I do a fresh install, without module, and i always have error on start :

    [22.01.2022 22:41.16.390] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported.
    Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.
    

    I can search on google, but i don’t find anything to resolve that… Do you have an idea ?

    S M 3 Replies Last reply Jan 23, 2022, 1:37 PM Reply Quote 0
    • S Away
      sdetweil @landaisbenj
      last edited by Jan 23, 2022, 1:37 PM

      @landaisbenj don’t know. my upgrade script tries to take care of all the extra details

      see

      https://github.com/sdetweil/MagicMirror_scripts

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @landaisbenj
        last edited by Jan 23, 2022, 1:38 PM

        @landaisbenj never seen this using my install script

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • L Offline
          landaisbenj
          last edited by Jan 23, 2022, 1:57 PM

          Ok si i could try with your script today. I follow instruction on documentation.

          S 1 Reply Last reply Jan 23, 2022, 1:59 PM Reply Quote 0
          • S Away
            sdetweil @landaisbenj
            last edited by Jan 23, 2022, 1:59 PM

            @landaisbenj move the existing mm folder out of the way if doing install

            cd ~
            mv MagicMirror MagicMirror.save
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • L Offline
              landaisbenj
              last edited by landaisbenj Jan 23, 2022, 3:42 PM Jan 23, 2022, 3:40 PM

              OMG It’s really helpfull… Need to be the first way on documentation… Ok, it work, i try now to réinstall all my modules.

              1 Reply Last reply Reply Quote 1
              • L Offline
                landaisbenj
                last edited by Jan 23, 2022, 4:48 PM

                All my module work. Thanks a lot… I’m on this by a few day…

                1 Reply Last reply Reply Quote 0
                • M Offline
                  mumblebaj Module Developer @landaisbenj
                  last edited by Jan 24, 2022, 4:50 PM

                  @landaisbenj I have seen this error before. It comes from installing the latest version of node-fetch whereas the module uses an older version of node-fetch. The latest version is an ES module and must be import’d instead of require’d in the node_helper.

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

                  S 1 Reply Last reply Jan 24, 2022, 5:33 PM Reply Quote 1
                  • S Away
                    sdetweil @mumblebaj
                    last edited by Jan 24, 2022, 5:33 PM

                    @mumblebaj but how did that happen? MM asks for newer, but module wants older?

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    M 1 Reply Last reply Jan 24, 2022, 5:35 PM Reply Quote 0
                    • M Offline
                      mumblebaj Module Developer @sdetweil
                      last edited by Jan 24, 2022, 5:35 PM

                      @sdetweil I would assume that the user may have installed a newer version. MM requires 2.6.6 which is not the ES version I think they changed from v3 onwards.

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

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      1 / 1
                      • First post
                        1/10
                        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