MagicMirror Forum

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

    SOLVED Trying to update node.js fails

    Troubleshooting
    3
    26
    362
    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.
    • T
      thad last edited by

      I recently updated MM and I’m having problems getting MM to start. It appears my issues are due to an old version of node.js (v10.15.2) and attempts to upgrade it fail. I can get MM to start using run-start.sh, but it doesn’t work with pm2. Here’s what I think should be a clue:

      Check current Node installation …
      Node currently installed. Checking version number.
      Minimum Node version: v16.9.1
      Installed Node version: v10.15.2
      Node should be upgraded.
      Installing Node.js …
      E: Repository ‘http://archive.raspberrypi.org/debian buster InRelease’ changed its ‘Suite’ value from ‘testing’ to ‘oldstable’
      E: Repository ‘http://raspbian.raspberrypi.org/raspbian buster InRelease’ changed its ‘Suite’ value from ‘stable’ to ‘oldstable’
      Reading package lists… Done
      Building dependency tree
      Reading state information… Done
      nodejs is already the newest version (10.15.2~dfsg-2+rpi1).
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      node version is
      Node.js installation Done! version=v10.15.2
      Check current NPM installation …
      NPM currently installed. Checking version number.
      npm does not support Node.js v10.15.2
      You should probably upgrade to a newer version of node as we
      can’t make any promises that npm will work with this version.
      You can find the latest version at https://nodejs.org/
      /usr/local/lib/node_modules/npm/lib/npm.js:32

      I need some help deciphering why it’s failing and what I can do to upgrade node.js successfully.

      Let me know if you have any suggestions, or if you think I’m looking in the wrong direction.

      Thanks.
      Thad

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

        @thad do you have nvm installed
        do

        which nvm 
        

        (if nvm is NOT installed u will get a blank response)
        nvm sets its own path which overrides the base path

        Sam

        Create a working config
        How to add modules

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

          @thad as for pm2, then show the pm2 logs

          pm2 logs --lines=100
          

          (ctrl-c to end)
          maybe need to clear them first to get shorter version

          pm2 flush
          then pm2 start
          them pm2 logs --lines=100 as above

          Sam

          Create a working config
          How to add modules

          B T 2 Replies Last reply Reply Quote 0
          • B
            bugsounet @sdetweil last edited by

            @thad said in Trying to update node.js fails:

            E: Repository ‘http://archive.raspberrypi.org/debian buster InRelease’ changed its ‘Suite’ value from ‘testing’ to ‘oldstable’
            E: Repository ‘http://raspbian.raspberrypi.org/raspbian buster InRelease’ changed its ‘Suite’ value from ‘stable’ to ‘oldstable’

            @sdetweil : to correct this:

            sudo apt-get --allow-releaseinfo-change update
            

            (I’m really so kind, this cannot last !!! 😵 )


            I am not a reference in this forum
            I am not a magician
            I'm just a developer

            Please DON'T ADS ANY of My Modules There !

            Follow new support of 4th party modules on https://forum.bugsounet.fr

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

              I don’t have nvm installed. The command ‘which nvm’ command returned nothing.

              If I clear the pm2 logs and immediately look at them, I’m seeing something odd. It appears I have 2 processed controlled by pm2. Here’s the output:

              pi@raspberrypi:~/MagicMirror $ pm2 logs --lines=100
              [TAILING] Tailing last 100 lines for [all] processes (change the value with --lines option)
              /home/pi/.pm2/pm2.log last 100 lines:
              /home/pi/.pm2/logs/MagicMirror-out.log last 100 lines:
              /home/pi/.pm2/logs/MagicMirror-error.log last 100 lines:
              /home/pi/.pm2/logs/mm-out.log last 100 lines:
              /home/pi/.pm2/logs/mm-error.log last 100 lines:

              I think the MagicMirror references are to my initial installation from a year or two ago. The references to ‘mm’ are what I attempted to do this morning.

              S 1 Reply Last reply Reply Quote 0
              • T
                thad @bugsounet last edited by

                @bugsounet said in Trying to update node.js fails:

                sudo apt-get --allow-releaseinfo-change update

                That made a big difference! The script that updates node.js now runs properly! Thanks.

                I’ll keep playing and see if I can get this thing running again.

                1 Reply Last reply Reply Quote 0
                • T
                  thad last edited by

                  @bugsounet @bugsounet

                  Thanks for your help. This has me running again. I need to work on the weather module some more. I have the current weather working, but the forecast is hung on ‘loading’. Thanks again for the super quick responses!

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

                    @bugsounet thx… added to upgrade, had for install

                    Sam

                    Create a working config
                    How to add modules

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

                      @thad pm2 status shows the processes registered to manage

                      pm2 info x (x is name or number) will show what it run

                      pm2 delete x will remove an entry

                      pm2 --help will show all the things u can do .

                      Sam

                      Create a working config
                      How to add modules

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        thad @sdetweil last edited by

                        @sdetweil

                        Thanks. I was able to remove the entry I created this morning, to there’s only one. I’m still having issues with pm2. If I start MM using pm2 after a couple of minutes it restarts. The pm2 log shows:

                        PM2 | pm2 has been killed by signal, dumping process list before exit…
                        PM2 | Deleting process 0
                        PM2 | Stopping app:MagicMirror id:0
                        PM2 | App [MagicMirror:0] exited with code [0] via signal [SIGTERM]
                        0|MagicMirror | /home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGTERM
                        PM2 | pid=1386 msg=process killed
                        PM2 | Exited peacefully
                        0|MagicM

                        For some reason this keeps cycling. At the moment I’ve started MM using the run-start.sh script and it appears to be stable.

                        S 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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy