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.

    "npm run start" does not work. Returns "sh 1 ./node_modules/.bin/electron not found"

    Scheduled Pinned Locked Moved Solved Troubleshooting
    14 Posts 2 Posters 1.9k 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.
    • S Offline
      sdetweil @tony-72
      last edited by

      @tony-72 well, what a mess

      the full (recommended) 64bit image for me boots to a Busybox prompt, tried 3 times w the rasp imager and another …

      SO, had to do the other 64 bit image (not full)

      then I had sd card problems… (I was working on my pi4 behind the 7 in touch screen which crashed the other day after a power failure… ) that sd card is trash

      so I used another… SO slow… (sd card toast)
      so I used ANOTHER… finally…
      but apt has some problem so reflashed AGAIN

      this time it installed correctly…

      BUT… I didnt see the problems you meantioned at all

      this is the image I used
      Screenshot at 2024-12-12 11-55-24.png

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • T Offline
        tony-72
        last edited by

        I appreciate all the hard work and assistance. So I believe it is working now. So I rebooted the Raspi and when it came up it showed there were updates. I allowed those updates to install. I then went into terminal and sudo update/sudo upgrade. After that, your script worked as advertised.

        Now I did not get through it all until this morning and have not been able to launch it again. I do know the pm2 works because it kept restarting MM every few seconds when I was trying to shut down the Raspi. I will mess with it tonight after i figure out how to disable the autostart. I believe it was “pm2 stop mm” or “pm2 stop MagicMirror”.

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

          @tony-72 pm2’s job is to keep the app running, so if it crashes pm2 restarts

          pm2 stop all

          pm2 logs --lines=50

          to look at the logs

          i strongly suggest stopping pm2 use while you install and test modules

          use npm start in the MagicMirror folder, ctrl-c to end, or ctrl-q on the browser

          this way you can see the messages from npm start easier

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • T Offline
            tony-72
            last edited by

            Awesome and thanks, everything working as advertised at the moment. About to attempt my first module install and config. Question, is there a text editor installed with your script? I was trying to figure out how to get VScode installed and where to install it, then realized there may be one on here already. What do you suggest, I have zero coding experience but I understand the concept and know a little from studying Cybersecurity.

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

              @tony-72 nano is the built in text editor, its text only

              vscode goes in system folders, has nothing to do with MM

              you could try my MMM-Config module which generates a form for config…
              https://github.com/sdetweil/MMM-Config

              also see this
              https://forum.magicmirror.builders/topic/19193/best-way-to-develop-from-windows-machine

              see the first link in my sig below for installing modules… (I didn’t write it)

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S sdetweil has marked this topic as solved on
              • 1
              • 2
              • 2 / 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