Bugsounet Coding

    • Register
    • Login
    • Search
    This Forum is now reserved to registred users!

    Solved Upgrading GA from v3 to v4 with a Raspberry pi 4b

    Issues
    4
    53
    219
    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.
    • A
      Angel last edited by

      Hello to all , i have a MM v2.17.1 and a GA v3.3 and even though i have made so many recipes and i understood so many stuff in the setting up of my mm i have also looking at the forum and the release of the new GAV4 with every module linked with it as an external module with a totally different programming tree. So i decided to go forward and upgrade to Ga v4 and as i go on to post the different kind of questions that will come up.
      So i am stating from the basics GA v4 requires a MM version from v2.18.x to v2.19.x and since mine is v2.17.1 i first need to upgrade my MM , and loose electron as i have seen somewhere : (.
      After an internet search the MM builders suggest this command to upgrade he mirror:

      git pull && npm install --only=prod --omit=dev
      
      

      unfortunately that did not work for me i got this response:

      pi@raspberrypi:~ $ cd ~/MagicMirror/
      pi@raspberrypi:~/MagicMirror $ git pull && npm install --only=prod --omit=dev
      hint: Pulling without specifying how to reconcile divergent branches is
      hint: discouraged. You can squelch this message by running one of the following
      hint: commands sometime before your next pull:
      hint: 
      hint:   git config pull.rebase false  # merge (the default strategy)
      hint:   git config pull.rebase true   # rebase
      hint:   git config pull.ff only       # fast-forward only
      hint: 
      hint: You can replace "git config" with "git config --global" to set a default
      hint: preference for all repositories. You can also pass --rebase, --no-rebase,
      hint: or --ff-only on the command line to override the configured default per
      hint: invocation.
      Updating 222a5f37..a2d7cdcf
      error: Your local changes to the following files would be overwritten by merge:
      	fonts/package-lock.json
      	package-lock.json
      	package.json
      	vendor/package-lock.json
      Please commit your changes or stash them before you merge.
      Aborting
      pi@raspberrypi:~/MagicMirror $ git status
      On branch master
      Your branch is behind 'origin/master' by 272 commits, and can be fast-forwarded.
        (use "git pull" to update your local branch)
      
      Changes not staged for commit:
        (use "git add <file>..." to update what will be committed)
        (use "git restore <file>..." to discard changes in working directory)
      	modified:   fonts/package-lock.json
      	modified:   package-lock.json
      	modified:   package.json
      	modified:   vendor/package-lock.json
      
      no changes added to commit (use "git add" and/or "git commit -a")
      pi@raspberrypi:~/MagicMirror $ 
      
      

      I do not remember making any changes to package.json or the other files mentioned here so i do not understand. I wonder from here what would be the best way to go forward and if you have the time i would love to hear the why also.

      1 Reply Last reply Reply Quote 0
      • The Dev3l
        The Dev3l last edited by

        Hello!

        Try removing the packages.json indicated by the terminal:

        sources/package-lock.json
        package-lock.json
        package.json
        vendor/package-lock.json

        And then proceed with the MM install command.

        1 Reply Last reply Reply Quote 0
        • The Dev3l
          The Dev3l last edited by

          But first make a copy of the modules folder, config.js and css.

          1 Reply Last reply Reply Quote 0
          • The Dev3l
            The Dev3l last edited by

            It should work, exactly the same thing happened to me.

            1 Reply Last reply Reply Quote 0
            • A
              Angel last edited by

              Thank you , Deleting manually the files through the file manager worked like a charm!

              A 1 Reply Last reply Reply Quote 0
              • A
                Angel @Angel last edited by

                @Angel ```
                pi@raspberrypi:~/MagicMirror $ git pull && npm install --only=prod --omit=dev
                hint: Pulling without specifying how to reconcile divergent branches is
                hint: discouraged. You can squelch this message by running one of the following
                hint: commands sometime before your next pull:
                hint:
                hint: git config pull.rebase false # merge (the default strategy)
                hint: git config pull.rebase true # rebase
                hint: git config pull.ff only # fast-forward only
                hint:
                hint: You can replace “git config” with “git config --global” to set a default
                hint: preference for all repositories. You can also pass --rebase, --no-rebase,
                hint: or --ff-only on the command line to override the configured default per
                hint: invocation.
                Already up to date.

                magicmirror@2.19.0 install /home/pi/MagicMirror
                echo "Installing vendor files …
                " && cd vendor && npm install --loglevel=error

                Installing vendor files …

                audited 9 packages in 0.794s
                found 0 vulnerabilities

                magicmirror@2.19.0 postinstall /home/pi/MagicMirror
                npm run install-fonts && echo "MagicMirror² installation finished successfully!
                "

                magicmirror@2.19.0 install-fonts /home/pi/MagicMirror
                echo "Installing fonts …
                " && cd fonts && npm install --loglevel=error

                Installing fonts …

                audited 2 packages in 5.688s
                found 0 vulnerabilities

                MagicMirror² installation finished successfully!

                npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.

                audited 761 packages in 23.427s

                70 packages are looking for funding
                run npm fund for details

                found 0 vulnerabilities

                
                As i am curious i went already and 
                npm run start    
                to see what is happening. The MM opened and load the config file that i also had before but this time MMM-Detector gives you a message to npm run rebuild and you cannot go further or the mirror does not even turn pages. So next step is to go inside the modules and then inside the Google assistant folder and now i am thinking , since i already had v3.3 setup will a simple :
                npm run update 
                will suffice? or should i go for the npm run rebuild ? Or i hear suggestions
                1 Reply Last reply Reply Quote 0
                • The Dev3l
                  The Dev3l last edited by

                  I don’t think any command works in MMM-Detector, that module doesn’t exist anymore, it’s EXT-Detector now, check wiki. The same happens with MMM-GoogleAssistant, it is now version V4.

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    Angel @The Dev3l last edited by

                    @The-Dev3l
                    Inside pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant $

                    i had already v3.3 before so should i do npm run update to go to v4 or
                    npm run rebuild or just again download with git clone as the wiki says for the new users that is what i wonder.

                    1 Reply Last reply Reply Quote 0
                    • The Dev3l
                      The Dev3l last edited by

                      Forgive me, I misunderstood you.

                      When switching from V3 to V4, npm run update doesn’t work, at least for me.
                      And npm run rebuild does not exist in V4.

                      I completely uninstalled it and reinstalled it from scratch, but note that it needs Gateway, EXT-Alert and EXT-Detector to work.

                      1 Reply Last reply Reply Quote 0
                      • A
                        Angel last edited by

                        So you think if i go inside the file explorer and just delete inside MagicMirror/modules/ the MMM-GoogleAssistant folder and the other MMM- assosiated folders with google assistant modules is a proper and complete uninstall?Ang then just git clone it from the start

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          Angel @Angel last edited by

                          Turns out a simple delete or cut-move will do it.
                          Following the wiki i git cloned inside modules directory the google assistant , it installed normally
                          but at the end i can see this :

                          MMM-GoogleAssistant is now installed !
                          npm notice created a lockfile as package-lock.json. You should commit this file.
                          npm WARN notsup Unsupported engine for find-up@6.3.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                          npm WARN notsup Not compatible with your version of node/npm: find-up@6.3.0
                          npm WARN notsup Unsupported engine for locate-path@7.1.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                          npm WARN notsup Not compatible with your version of node/npm: locate-path@7.1.0
                          npm WARN notsup Unsupported engine for path-exists@5.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                          npm WARN notsup Not compatible with your version of node/npm: path-exists@5.0.0
                          npm WARN notsup Unsupported engine for p-locate@6.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                          npm WARN notsup Not compatible with your version of node/npm: p-locate@6.0.0
                          npm WARN notsup Unsupported engine for p-limit@4.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                          npm WARN notsup Not compatible with your version of node/npm: p-limit@4.0.0
                          
                          added 119 packages from 148 contributors and audited 119 packages in 39.132s
                          
                          15 packages are looking for funding
                            run `npm fund` for details
                          
                          found 0 vulnerabilities
                          
                          

                          What is happening here? should i change my npm version so that those can be installed ? or i do not understand exactly .

                          1 Reply Last reply Reply Quote 1
                          • bugsounet
                            bugsounet Main Coder last edited by

                            cd ~/MagicMirror/modules/MMM-GoogleAssistant
                            rm -rf package-lock.json node_modules
                            git checkout -f prod
                            git reset --hard HEAD
                            git pull
                            npm install
                            
                            1 Reply Last reply Reply Quote 0
                            • A
                              Angel last edited by

                              Bugs for the win as usual xD
                              still though at the end of the installation i can see those and i am not sure if i need to change npm version to v14.13.1 and up in order to install them . is that correct?

                              1 Reply Last reply Reply Quote 0
                              • bugsounet
                                bugsounet Main Coder last edited by

                                Hi, Just follow wiki rules 😉

                                A 1 Reply Last reply Reply Quote 1
                                • A
                                  Angel @bugsounet last edited by

                                  I think i am checking the current wiki right now and it doesn’t say anything anywhere about those warns at the end of the installation.

                                  pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant $ npm install
                                  
                                  > MMM-GoogleAssistant@4.0.3 preinstall /home/pi/MagicMirror/modules/MMM-GoogleAssistant
                                  > installer/preinstall.sh
                                  
                                  
                                  Welcome to MMM-GoogleAssistant v4.0.3
                                  
                                  No root checking...
                                  Checking MMM-GoogleAssistant: pi/pi
                                  Checking MagicMirror: pi/pi
                                  
                                  Checking OS...
                                  OS Detected: linux-gnueabihf (raspbian 11 armv7l)
                                  
                                  Installing all npm libraries...
                                  
                                  > @bugsounet/secure-ga-v4@1.0.1 preinstall /home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/@bugsounet/secure-ga-v4
                                  > node secure.js
                                  
                                  [SECURE] Check MMM-GoogleAssistant digital footprint...
                                  [SECURE] Ok, Good choice!
                                  [SECURE] Let's continue installing...
                                  
                                  > protobufjs@6.11.2 postinstall /home/pi/MagicMirror/modules/MMM-GoogleAssistant/node_modules/protobufjs
                                  > node scripts/postinstall
                                  
                                  
                                  > MMM-GoogleAssistant@4.0.3 postinstall /home/pi/MagicMirror/modules/MMM-GoogleAssistant
                                  > installer/postinstall.sh
                                  
                                  Minify Main code
                                  Process File: ../node_helper.js
                                  Process File: ../components/assistant.js
                                  Process File: ../components/response.js
                                  Process File: ../components/screenParser.js
                                  Process File: ../MMM-GoogleAssistant.js
                                  Done
                                  
                                  Support is now moved in a dedicated Server: https://forum.bugsounet.fr
                                  @bugsounet
                                  
                                  MMM-GoogleAssistant is now installed !
                                  npm notice created a lockfile as package-lock.json. You should commit this file.
                                  npm WARN notsup Unsupported engine for find-up@6.3.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                                  npm WARN notsup Not compatible with your version of node/npm: find-up@6.3.0
                                  npm WARN notsup Unsupported engine for locate-path@7.1.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                                  npm WARN notsup Not compatible with your version of node/npm: locate-path@7.1.0
                                  npm WARN notsup Unsupported engine for path-exists@5.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                                  npm WARN notsup Not compatible with your version of node/npm: path-exists@5.0.0
                                  npm WARN notsup Unsupported engine for p-locate@6.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                                  npm WARN notsup Not compatible with your version of node/npm: p-locate@6.0.0
                                  npm WARN notsup Unsupported engine for p-limit@4.0.0: wanted: {"node":"^12.20.0 || ^14.13.1 || >=16.0.0"} (current: {"node":"14.0.0","npm":"6.14.15"})
                                  npm WARN notsup Not compatible with your version of node/npm: p-limit@4.0.0
                                  
                                  added 119 packages from 148 contributors and audited 119 packages in 14.982s
                                  
                                  15 packages are looking for funding
                                    run `npm fund` for details
                                  
                                  found 0 vulnerabilities
                                  
                                  

                                  those at the end say not compatible with your version of node/npm but i have installed node 14 and npm 6.14.15 as the modules wanted before. What should i do ?

                                  1 Reply Last reply Reply Quote 0
                                  • A
                                    Angel last edited by

                                    find-up@6.3.0
                                    locate-path@7.1.0
                                    path-exists@5.0.0
                                    p-locate@6.0.0
                                    p-limit@4.0.0
                                    i have a warning at the end about all these i think they are not properly installed? or upgraded to the last vesion not sure but something is wrong here

                                    1 Reply Last reply Reply Quote 0
                                    • bugsounet
                                      bugsounet Main Coder last edited by

                                      just install a correct the correct node version

                                      needed ^14.13.1 --> minimal node v14.13.1
                                      and you have: current: {"node":"14.0.0" ...

                                      It’s writed, just read 🙂

                                      1 Reply Last reply Reply Quote 1
                                      • A
                                        Angel last edited by

                                        i am still quite a noob at linux but i am learning and i am not sure sometimes which is the best path.
                                        Thank you very much though i bet they are so many people at my level or lower out there that they will for
                                        sure find a lot of help in this post. Its because you already are a programming god and we are still learning to code , especially with node xD

                                        1 Reply Last reply Reply Quote 1
                                        • A
                                          Angel last edited by

                                          So for the rest of the starting coders i personally have installed and use the : Node version Manager
                                          and i opened a terminal
                                          nvm install v16.0.0
                                          and then because v16 comes with another npm you will also have to type :
                                          npm install -g npm@6.14.15
                                          then
                                          npm install and everything is smooth.
                                          Which node version works bett with the new v4 Google Assistant 14.13.1 or 16.0.0 or someone else ?

                                          1 Reply Last reply Reply Quote 0
                                          • bugsounet
                                            bugsounet Main Coder last edited by bugsounet

                                            Humm…
                                            maybe the wiki is useless ?
                                            should I delete it ?
                                            or maybe an writer access is needed ? do you want to rewrite it ?

                                            Or make as you want 😉 (If you prefer ignore all my suggest)

                                            and try to do better:
                                            d168b7e2-3a32-4089-b2cd-3beaba84432f-image.png

                                            see you in ~50 days (if you have this uptime)

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB | @bugsounet ©2022