MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    SOLVED MMM-Fitbit2 Install Process

    Troubleshooting
    3
    15
    187
    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.
    • E
      En-TACT last edited by

      I’m new to Magic Mirror and module installs therefore, I am stumped on next step to install dependencies for MMM-Fitbit2. I’m in the directory MagicMirror/modules/MMM-Fitbit2 and ran the command ./init.sh, however, I received this error: npm ERR! must provide string spec

      S V 2 Replies Last reply Reply Quote 0
      • V
        Vizulize Module Developer @En-TACT last edited by

        @En-TACT Check that you have the correct client ID, client secret, and the redirect URI.

        E 1 Reply Last reply Reply Quote 0
        • S
          sdetweil @En-TACT last edited by

          @En-TACT I think you will have to open an issue on the module GitHub page to engage the author to help fix this

          Sam

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • V
            Vizulize Module Developer @En-TACT last edited by

            @En-TACT init.sh just runs npm install (ref), so you can try the various StackOverflow suggestions to see if they help.

            E 1 Reply Last reply Reply Quote 0
            • E
              En-TACT @Vizulize last edited by

              @Vizulize, thank you for that support page! The following commands worked for me to install dependencies:

              sudo npm i -g npm-check-updates
              sudo npm init
              sudo npm install
              sudo ./init.sh

              Now, I’m stuck on the authorization step. After entering ./auth.sh, it idles after I enter my client ID and clientSecret -supposed to open a browser and create the python/tokens-.json file.

              Would love to have this running, but I think this module needs attention. I’ll reach out again to the author.

              V S 2 Replies Last reply Reply Quote 0
              • V
                Vizulize Module Developer @En-TACT last edited by

                @En-TACT I am the author. What is your setup? Are you trying to run it headlessly?

                E 1 Reply Last reply Reply Quote 0
                • S
                  sdetweil @En-TACT last edited by sdetweil

                  @En-TACT you should not use sudo except for the first line where you were updating the global NPM version everything else should have been without sudo.

                  using sudo marks all the files as owned by root not by the user and that causes execution problems, has magic mirror runs under the users permission not root.

                  Sam

                  Create a working config
                  How to add modules

                  E 1 Reply Last reply Reply Quote 0
                  • E
                    En-TACT @Vizulize last edited by

                    @Vizulize , I’m on authorization step. After I enter ./auth.sh via terminal, it prompts me for clientID and clientSecret. I can see the alpha-numeric characters I typed for clientID, but not for clientSecret. The cursor just sits there … is this intended? After I press enter, it does not open a browser.
                    Also, no python/tokens-.json file was creadted. Therefore my Fitbit module is only showing “Loading”.

                    My setup:

                    • Raspberry Pi 3 B+ v1.2
                    • USB Keyboard
                    • Wireless Mouse
                    • Raspbian Linux 11 (bullseye)

                    Thanks!

                    1 Reply Last reply Reply Quote 0
                    • E
                      En-TACT @sdetweil last edited by

                      @sdetweil, should I repeat those steps again with first line sudo? Or, should I remove MMM-Fitbit module and start anew?

                      Just to be thorough to repeat the steps, I would run:

                      sudo npm i -g npm-check-updates
                      npm init
                      npm install
                      ./init.sh

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        sdetweil @En-TACT last edited by sdetweil

                        @En-TACT The first step is done No need to fix that.

                        you should not do the NPM init at all
                        as it will overwrite the package.json the author provided

                        The other two steps depend on Python3 and I don’t know if the system you’re using has Python3 installed properly yet. The raspberry pi does not come with python3 installed by default

                        Sam

                        Create a working config
                        How to add modules

                        E 1 Reply Last reply Reply Quote 0
                        • E
                          En-TACT @sdetweil last edited by

                          @sdetweil I ran the command, python --version. Returned Python 3.9.2.

                          Does that suffice, or is there something I can run to check python is properly installed?

                          S 1 Reply Last reply Reply Quote 0
                          • 1
                          • 2
                          • 1 / 2
                          • First post
                            Last post
                          Enjoying MagicMirror? Please consider a donation!
                          MagicMirror created by Michael Teeuw.
                          Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                          This forum is using NodeBB as its core | Contributors
                          Contact | Privacy Policy