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 on starting MM2: module not present

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    22 Posts 2 Posters 6.9k 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
      MWel1977
      last edited by

      I’m trying to run this module “MMM-Swipe”. After setting up the 2 ultrasonic sensors and setting the GPIO pins in the config.js file I had to run the MM2 via “sudo npm start”. But instead of running the MM2 freezes/lock-up. Nothing works anymore.
      Turns out I get an error on the Swipe-module. It needs a module MMM.usonic to run. But it can’t be found. It’s not installed. And I can’t find it in the module list either.
      0_1547406272722_Screenshot_20190112-210145_Video Player.jpg

      Does anybody know how to solve this?

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

        https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.npmjs.com/package/mmm-usonic&ved=2ahUKEwjE5q2ru-vfAhVutlkKHS95A7wQFjAAegQIAxAB&usg=AOvVaw3KdlihTh4Gc7h1LZHW2oFM

        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
          MWel1977
          last edited by

          hmmmmm…should have done this soner…
          just googled for “mmm-usonic” and turns out its not a MagicMirror module but a npm module (https://www.npmjs.com/package/mmm-usonic)
          I can install it via: “npm install mmm-usonic --save”
          but in what folder must I install it?
          Or wil it be installed in the correct folder anyway?

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

            @sdetweil Hahahahaha…euh…hehehe…found that just after I put my question up here.:nerd_face: :nerd_face:

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

              @mwel1977 if u are in the mm folder, it will be there unless u use -g (global)

              Probably should be for the module trying to use the sensors

              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
                MWel1977 @sdetweil
                last edited by

                @sdetweil I installed the mmm-usonic from the home/pi/ folder and I can see the mmm-usonic folder under /home/pi/node_modules.
                And according to the error notification on starting the MM2 it is in the correct folder but it has something to do with it being compiled against a different Node.js version.
                the module usonic.node was compiledagainst a different Node.js version using NODE_MODULE_VERSION 59. This version of Node.js requires NODE_MODULE_VERSION 57. Please try re-compiling or re-installing the module (for instance, using ‘npm rebuild’ or ‘npm install’).

                I did both rebuild and install but the problem isn’t solved.
                Also I don’t know how to rebuild the module… don’t know what module they want me to rebuild as a matter of fact… the usonic module or the Swipe module? and in what folder in the terminal should I be in while rebuilding?
                Must it be a specific folder or just any folder?

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MWel1977
                  last edited by

                  Found something at: link text but got no idea what all that means.
                  I do think I need to delete the node_modules folder and rebuild the module.
                  But hope someone can help me with it by explaining what npm is.
                  and how the MagicMirror fits in it.
                  My guess would be that it is the overall driver and the the MM2 is working with this driver. but I’m not sure.

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

                    @mwel1977 npm is the Node Package Manager. It makes sure all the env is right (read package.json), then launches node to execute the startup script.

                    You can code different actions, and then tell npm to execute that action.

                    foobar: some command

                    Then npm foobar will execute that command

                    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
                      MWel1977 @sdetweil
                      last edited by

                      @sdetweil is npm then the compiler?
                      If so how can I recompile the mmm-usonic module so it works with my current Node.js version?
                      Is there somewere documentation on how this npm works and how all the modules are tide in it?

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

                        npm --help should give you the options…

                        from MM,

                        npm rebuild MMM-usonic 
                        

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        M 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 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