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

Cannot find module 'node-fetch' error with MMM-SoccerLiveScore

Scheduled Pinned Locked Moved Solved Troubleshooting
34 Posts 5 Posters 8.4k Views 5 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.
  • S Offline
    sdetweil @codac
    last edited by sdetweil Jan 2, 2024, 6:43 PM Jan 2, 2024, 6:42 PM

    @codac then you didnt do the npm install in the correct module folder
    and I assume you have to restart MM of the container to pick up the change

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    C 1 Reply Last reply Jan 2, 2024, 6:54 PM Reply Quote 0
    • C Offline
      codac @sdetweil
      last edited by Jan 2, 2024, 6:54 PM

      @sdetweil

      root@04492d039b9f:/opt/magic_mirror/modules# cd MMM-SoccerLiveScore              
      root@04492d039b9f:/opt/magic_mirror/modules/MMM-SoccerLiveScore# npm install node
      -fetch@2                                                                         
                                                                                       
      up to date, audited 1 package in 1s                                              
                                                                                       
      found 0 vulnerabilities                                                         
      

      How would I restart MM of the container?
      pm2 is not set up.

      DISPLAY=:0 npm restart
      

      …results in

      > magicmirror@2.26.0 restart                                                     
      > npm stop --if-present && npm start                                             
                                                                                       
                                                                                       
      > magicmirror@2.26.0 start                                                       
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js           
                                                                                       
      sh: 1: ./node_modules/.bin/electron: not found   
      
      S C 2 Replies Last reply Jan 2, 2024, 6:56 PM Reply Quote 0
      • S Offline
        sdetweil @codac
        last edited by Jan 2, 2024, 6:56 PM

        @codac seen this happening more

        in the container again
        in the MagicMirror folder do

        npm install electron@27.2.0
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Jan 2, 2024, 7:00 PM Reply Quote 0
        • C Offline
          codac @sdetweil
          last edited by Jan 2, 2024, 7:00 PM

          @sdetweil
          sorry for the hussle, but this seems to never end :anguished_face:

          after running

          npm install electron@27.2.0
          

          I tried to restart MM:

          root@04492d039b9f:/opt/magic_mirror# DISPLAY=:0 npm restart                      
                                                                                           
          > magicmirror@2.26.0 restart                                                     
          > npm stop --if-present && npm start                                             
                                                                                           
                                                                                           
          > magicmirror@2.26.0 start                                                       
          > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js           
                                                                                           
          /opt/magic_mirror/node_modules/electron/dist/electron: error while loading shared
           libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or 
          directory                                                           
          
          S 1 Reply Last reply Jan 2, 2024, 7:19 PM Reply Quote 0
          • S Offline
            sdetweil @codac
            last edited by Jan 2, 2024, 7:19 PM

            @codac yeh, seems that electron needs something from the container
            do you know which container you are using?

            @karsten13 can u look at this

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            K 1 Reply Last reply Jan 2, 2024, 7:24 PM Reply Quote 0
            • K Offline
              karsten13 @sdetweil
              last edited by Jan 2, 2024, 7:24 PM

              @sdetweil

              he must restart the container, this cannot be done from inside the container

              so how was the container started? With docker compose oder docker run ... or?

              S C 2 Replies Last reply Jan 2, 2024, 7:25 PM Reply Quote 0
              • S Offline
                sdetweil @karsten13
                last edited by Jan 2, 2024, 7:25 PM

                @karsten13 this

                libgobject-2.0.so.0: cannot open shared object file: No such file or directory                                                           
                

                will be fixed by container restart ?

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                K C 2 Replies Last reply Jan 2, 2024, 7:28 PM Reply Quote 0
                • K Offline
                  karsten13 @sdetweil
                  last edited by Jan 2, 2024, 7:28 PM

                  @sdetweil

                  I don’t now, the old electron process is still running

                  but we now nothing, how he started, in server only or with electron, which architecture, which host os, which hardware …

                  C 1 Reply Last reply Jan 2, 2024, 7:37 PM Reply Quote 0
                  • C Offline
                    codac @karsten13
                    last edited by Jan 2, 2024, 7:35 PM

                    @karsten13

                    docker run
                    
                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      codac @sdetweil
                      last edited by Jan 2, 2024, 7:36 PM

                      @sdetweil
                      This error only comes up when trying to restart MM inside the docker.
                      When restarting the docker, this error wont show up.

                      1 Reply Last reply Reply Quote 1
                      • 1
                      • 2
                      • 3
                      • 4
                      • 1 / 4
                      1 / 4
                      • First post
                        8/34
                        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