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.

    fixuppm2.sh

    Scheduled Pinned Locked Moved Solved Troubleshooting
    6 Posts 2 Posters 136 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.
    • AssassinsA Offline
      Assassins
      last edited by

      @sdetweil
      pi@MagicMirror:~ $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)”
      the log will be saved in /home/pi/MagicMirror/installers/pm2_setup.log
      sudo: npm: command not found
      bash: linje 127: pm2: command not found
      bash: linje 211: pm2: command not found
      bash: linje 214: pm2: command not found
      pi@MagicMirror:~ $ npm -v
      11.6.2
      pi@MagicMirror:~ $

      The log say

      pm2 setup starting - tor okt 16 18:38:30 CEST 2025
      using parameter bash
      system is Linux EmptyImage 6.12.47+rpt-rpi-v7 #1 SMP Raspbian 1:6.12.47-1+rpt1~bookworm (2025-09-16) armv7l GNU/Linux
      the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm
      node version v22.20.0
      force installing latest npm version via npm
      npm version 10.9.3
      pm2 not installed, installing
      get the pm2 platform specific startup command
      startup command =
      pm2 startup command done
      configure the pm2 config file for MagicMirror
      start MagicMirror via pm2 now
      save MagicMirror pm2 config now
      pm2 setup completed - tor okt 16 18:39:22 CEST 2025
      pm2 setup starting - fre okt 17 13:46:28 CEST 2025
      using parameter bash
      system is Linux MagicMirror 6.12.47+rpt-rpi-v7 #1 SMP Raspbian 1:6.12.47-1+rpt1~bookworm (2025-09-16) armv7l GNU/Linux
      the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm
      node version v22.20.0
      force installing latest npm version via npm
      npm version 11.6.2
      pm2 not installed, installing
      get the pm2 platform specific startup command
      startup command =
      pm2 startup command done
      configure the pm2 config file for MagicMirror
      start MagicMirror via pm2 now
      save MagicMirror pm2 config now
      pm2 setup completed - fre okt 17 13:46:29 CEST 2025
      

      i can install pm2 but only with “npm install -g pm2” and not “sudo npm install -g pm2”

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @Assassins
        last edited by sdetweil

        @Assassins -g means it’s available globally across the system
        You can execute it in every folder
        AND globally means adding to the /usr folder tree which require root authority (sudo)

        Without means you have to be in the folder tree where you did npm install, AND If the install folder is NOT in the path, then you have to prefix pm2 with the correct path EVERY TIME

        I think this also breaks boot time support which is the primary value, in my opinion

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil said in fixuppm2.sh:

          @Assassins -g means it’s available globally across the system
          You can execute it in every folder
          AND globally means adding to the /usr folder tree which require root authority (sudo)

          Without means you have to be in the folder tree where you did npm install, AND If the install folder is NOT in the path, then you have to prefix pm2 with the correct path EVERY TIME

          I think this also breaks boot time support which is the primary value, in my opinion

          But your script works fine now that I have installed pm2

          S 1 Reply Last reply Reply Quote 0
          • AssassinsA Assassins has marked this topic as solved
          • S Do not disturb
            sdetweil @Assassins
            last edited by

            @Assassins which script?
            And how did you install it. -g or not

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil said in fixuppm2.sh:

              @Assassins which script?

              bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)”

              And how did you install it. -g or not

              With -g
              My second test was without -g and it works there too

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @Assassins
                last edited by

                @Assassins weird

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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