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.

    Hello-Lucy installation troubles

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    31 Posts 4 Posters 12.2k Views 4 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
      SSkull995 @sdetweil
      last edited by SSkull995

      @sdetweil So I just ran again the installer, weird thing happens. I don’t know why, the package.json is not present in the directory. So this message comes up:
      npm WARN saveError ENOENT: no such file or directory, open ‘/root/pocketsphinx/package.json’
      npm WARN enoent ENOENT: no such file or directory, open ‘/root/pocketsphinx/package.json’
      npm WARN pocketsphinx No description
      npm WARN pocketsphinx No repository field.
      npm WARN pocketsphinx No README data
      npm WARN pocketsphinx No license field.

      That is why I don’t have it installed! Should I generate a random package.json with the npm init command?

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

        @sdetweil
        This is the output error when I run npm start. I generated the config.json with the npm init, no more errors during dependencies installation.

        [17:54:16.999] [ERROR] App threw an error during load
        [17:54:17.000] [ERROR] Error: Cannot find module ‘pocketsphinx-continuous’
        at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
        at Function.Module._resolveFilename (/home/pi/MM/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
        at Function.Module._resolveFilename (/home/pi/MM/node_modules/module-alias/index.js:49:29)
        at Function.Module._load (internal/modules/cjs/loader.js:528:25)
        at Module.require (internal/modules/cjs/loader.js:658:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object. (/home/pi/MM/modules/Hello-Lucy/node_helper.js:2:13)
        at Object. (/home/pi/MM/modules/Hello-Lucy/node_helper.js:410:3)
        at Module._compile (internal/modules/cjs/loader.js:711:30)
        at Object.Module._extensions…js (internal/modules/cjs/loader.js:722:10)
        [17:54:17.002] [LOG] Whoops! There was an uncaught exception…
        [17:54:17.002] [ERROR] { Error: Cannot find module ‘pocketsphinx-continuous’
        at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
        at Function.Module._resolveFilename (/home/pi/MM/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
        at Function.Module._resolveFilename (/home/pi/MM/node_modules/module-alias/index.js:49:29)
        at Function.Module._load (internal/modules/cjs/loader.js:528:25)
        at Module.require (internal/modules/cjs/loader.js:658:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object. (/home/pi/MM/modules/Hello-Lucy/node_helper.js:2:13)
        at Object. (/home/pi/MM/modules/Hello-Lucy/node_helper.js:410:3)
        at Module._compile (internal/modules/cjs/loader.js:711:30)
        at Object.Module._extensions…js (internal/modules/cjs/loader.js:722:10) code: ‘MODULE_NOT_FOUND’ }

        There still is this:
        [STEP 3/5] Installing pocketsphinx | Done
        [STEP 4/5] Exporting paths
        [STEP 4/5] Exporting paths | Done
        [STEP 5/5] Installing npm dependencies
        dependencies.sh: line 89: cd: /root/MagicMirror/modules/Hello-Lucy: No such file or directory

        Why no directory in root? Many thanks and sorry!

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

          @SSkull995 you have to

          cd ~/MagicMirror/modules/MMM-Hello-Lucy/installers
          ./dependencies.sh
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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

            AND NOT sudo
            And logged on as normal user, not root

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil man, I never ran sudo.
              And I still don’t know why the program gives me the error about the config.json file and the dependencies.sh
              Btw, ./dependencies is no command

              S S 2 Replies Last reply Reply Quote 0
              • S Offline
                SSkull995 @SSkull995
                last edited by

                @SSkull995 just to be sure, I ran the program again, the installer. This time with the ./dependencies. Errors+no dependencies directory found

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

                  @SSkull995 did u look in the folder?

                  It’s ./dependencies.sh

                  The only file in the module/installers folder

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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

                    we may have to start over, as I have no idea what ‘installer’ u have been running or how

                    cd ~/MagicMirror/modules
                    rm -rf MMM-Hello-Lucy
                    Then git clone Mykles repo
                    cd MMM-Hello-Lucy
                    cd installers
                    ./dependencies.sh
                    cd ..
                    npm install
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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

                      @sdetweil actually I have dependencies.sh, because the ./ makes it invisible even if it was there. Typing ls in installers makes me see the normal dependencies.sh

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

                        @SSkull995 but it is not in the path, do you have to use ./ to select it

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • Mykle1M Offline
                          Mykle1 Project Sponsor Module Developer
                          last edited by Mykle1

                          From the readme

                          Please complete all 3

                          Open a terminal.

                          git clone https://github.com/mykle1/Hello-Lucy into the ~/MagicMirror/modules directory

                          Then
                          cd Hello-Lucy/installers

                          Then
                          bash dependencies.sh

                          Create a working config
                          How to add modules

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

                            I can see I did not really explained myself, and I am sorry for that. I did the three passages of yours in the readme, and after reinstalling everything now it does not show me any error during installation! Yes!
                            BUT, now I run MagicMirror with the module installed and put in the config.js, and this message comes up:

                            No helper found for module: alert.
                            [15:12:13.980] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: SyntaxError: Unexpected token ] in JSON at position 6643

                            This occurs only when I put the module in config.js, but I don’t know where the error is, what is the JSON file?
                            Many thanks and sorry!

                            Mykle1M 2 Replies Last reply Reply Quote 0
                            • Mykle1M Offline
                              Mykle1 Project Sponsor Module Developer @SSkull995
                              last edited by

                              @SSkull995 said in Hello-Lucy installation troubles:

                              This occurs only when I put the module in config.js, but I don’t know where the error is

                              I see. I just did an install on a new machine and encountered the same error. I’m looking into it. Even my working Lucy installation is suffering the same error. Weird.

                              Create a working config
                              How to add modules

                              1 Reply Last reply Reply Quote 0
                              • Mykle1M Offline
                                Mykle1 Project Sponsor Module Developer @SSkull995
                                last edited by

                                @SSkull995 said in Hello-Lucy installation troubles:

                                First, forgive me. This entire issue was my fault.

                                I recently added some defaults to the checkCommands.json file and left a trailing comma at the end of the file. I’ve corrected the problem, tested it and pushed the corrected file to the repo. To clear the SyntaxError: Unexpected token ] in JSON at position 6643 error, following this instruction.

                                Do a git pull in the Hello-Lucy directory.

                                Please advise on the result. :-)

                                Create a working config
                                How to add modules

                                S 2 Replies Last reply Reply Quote 0
                                • S Offline
                                  SSkull995 @Mykle1
                                  last edited by

                                  @Mykle1 Perfect! I will do it right now, let me just boot my raspi. Many thanks and sorry once more, I was into solving this problem, but I could not figure out where the json was ahah!

                                  1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    SSkull995 @Mykle1
                                    last edited by

                                    @Mykle1 You are the man! Now it works without problems! I just can’t get my intro .mp3 work, but that is simple fix. Many thanks Mykle! Have a nice day and sorry for the problems :)

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

                                      Ok so, troubles again sorry! I just restarted MM and now Lucy starts but does not hide my modules and does not get the starting phrase. The microphone is working as the speaker, and the modules are the same as before.
                                      No clue why this occurs, no errors during MM startup

                                      Edit:
                                      I notice that the intro voice starts, as well as the mic icon and the string “Say Hello Lucy”. However, all my modules are there, as the program does not hide them, and the start phrase is not recognised. I just used alsamixer to check the card number, which matches the config.js one. Further, I tried to record myself and the microphone works without problems, I can clearly hear my voice and the hello Lucy phrase.
                                      Maybe something in the program is still making some troubles? Many thanks again Mykle!

                                      So many edit:
                                      Now when I start the MM, the microphone blinks barred, like no microphone. And it’s stated “Command Please”. It is weird, because I launched it and it froze on the “command” and no mic and no welcome phrases. Sometimes it starts tho, without really a scheme

                                      1 Reply Last reply Reply Quote 0
                                      • Mykle1M Offline
                                        Mykle1 Project Sponsor Module Developer
                                        last edited by Mykle1

                                        Not really sure what your issue is now. I did make some changes to the repo just now, including a new config entry. So, for starters, do another git pull in the Hello-Lucy directory and use the new config entry. This should solve all the modules showing at startup. Only your pageOne modules will show as default.

                                        The instructions state to run arecord -ls in your terminal to determine your devices and microphone entry as does the config entry sample itself. *shrug

                                        To hear any startup phrases you must have the sound files in the sounds folder AND the names of the sounds in the config entry. They are case sensitive.

                                        All the modules you want to use with Lucy have to be installed and enabled and entered in to config. If they are not one of the default modules then they have to be added to Lucy. Instructions are in the repo

                                        Create a working config
                                        How to add modules

                                        S 1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          SSkull995 @Mykle1
                                          last edited by SSkull995

                                          @Mykle1 Hi Mykle! Thank you, I will absolutely update the repo.
                                          The issue is this: after a while on npm start and ctrl+c in the MM, to check the modules and the correct behaviour of them, I noticed that the microphone starts to blink on the upper right corner and the phrase “command please” comes up. From that point, Lucy does not recognise any word I say, even if the microphone is full functional and records super fine.

                                          One thing for the sound, I realise that for the intro sound (1.mp3 and 11.mp3) you have to keep the [], even if there is only one .mp3 file. Was is supposed to be like this? Because the ding.mp3 is not between brackets, but I remove the brackets from the intro sound, then Lucy does not play any sound at the start up

                                          Edit:
                                          I managed to make everything work! However I have a problem now, because the error occurred again
                                          [20:12:09.572] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: SyntaxError: Unexpected token ] in JSON at position 7147
                                          at JSON.parse ()
                                          at Object. (/home/pi/MagicMirror/modules/Hello-Lucy/node_helper.js:26:26)
                                          at Module._compile (internal/modules/cjs/loader.js:786:30)
                                          at Object.Module._extensions…js (internal/modules/cjs/loader.js:798:10)
                                          at Module.load (internal/modules/cjs/loader.js:645:32)
                                          at Function.Module._load (internal/modules/cjs/loader.js:560:12)
                                          at Module.require (internal/modules/cjs/loader.js:685:19)
                                          at require (internal/modules/cjs/helpers.js:16:16)
                                          at loadModule (/home/pi/MagicMirror/js/app.js:132:17)
                                          at loadNextModule (/home/pi/MagicMirror/js/app.js:166:5)

                                          It just happened, 3 mins ago I was able to use Lucy without problems!

                                          Mykle1M 1 Reply Last reply Reply Quote 0
                                          • Mykle1M Offline
                                            Mykle1 Project Sponsor Module Developer @SSkull995
                                            last edited by Mykle1

                                            @SSkull995 said in Hello-Lucy installation troubles:

                                            One thing for the sound, I realise that for the intro sound (1.mp3 and 11.mp3) you have to keep the [], even if there is only one .mp3 file. Was is supposed to be like this?

                                            Yes.

                                            Because the ding.mp3 is not between brackets, but I remove the brackets from the intro sound, then Lucy does not play any sound at the start up

                                            That is correct. You can remove the contents of the brackets but not the brackets themselves.

                                            Please correct syntax errors at or above this line: SyntaxError: Unexpected token ] in JSON at position 7147
                                            at JSON.parse ()

                                            I just mentioned this error above and the reason for it. If you have added to/modified the checkCommands.json file it is likely you left a comma after the very last array in the file, or some other mistake.

                                            I’m finding it hard to pinpoint your issue based on your description of the problems you’re having. Sometimes it works, sometimes it doesn’t.

                                            Create a working config
                                            How to add modules

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