• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 770 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.
  • T Offline
    tony-72
    last edited by Dec 11, 2024, 4:00 PM

    “sh 1 ./node_modules/.bin/electron not found”

    This is what I get when I attempt “npm run start” on my Pi3 b with Raspi OS and following the instructions from the documentation.
    Initially had issues with the npm and node.js versions. I had to start from scratch with the SD card and update/upgrade then some “global” installation to get lates version of node.js.
    Now this is and issue and I did global install electron but it was after the magicmirror install script…

    Do I need to install electron before the magicmirror install script? I was under the impression electron was installed as a part of that process.

    S 1 Reply Last reply Dec 11, 2024, 4:06 PM Reply Quote 0
    • T Offline
      tony-72
      last edited by Dec 12, 2024, 10:38 PM

      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 Dec 12, 2024, 11:05 PM Reply Quote 0
      • S Away
        sdetweil @tony-72
        last edited by Dec 11, 2024, 4:06 PM

        @tony-72 global npm install put the files OUTSIDE the magicmirror folder

        so ./node_modules/.bin/electron
        is the same as
        $HOME/MagicMirror/node_modules/.bin/electron

        the file is not there

        IF you use my install script… it does everthing, BUT sometimes npm doesn’t install electron for some reason…
        if you want to start NOW with the script, I recommend starting with a new SD card flash
        then running the script.

        you can try manually (which usualy succeeds)

        cd ~/MagicMirror
        npm install electron@31.6.0
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        T 1 Reply Last reply Dec 11, 2024, 4:14 PM Reply Quote 0
        • T Offline
          tony-72 @sdetweil
          last edited by Dec 11, 2024, 4:14 PM

          @sdetweil First, thanks for such a speedy response, I will attempt your script when I get home. I did see it as the alternative but wanted to try the supposedly straight forward step by step. So I will start over with a new SD card flash and follow your script, at which point will I need to use the manual method you referenced above?

          S 1 Reply Last reply Dec 11, 2024, 4:20 PM Reply Quote 0
          • S Away
            sdetweil @tony-72
            last edited by Dec 11, 2024, 4:20 PM

            @tony-72 said in "npm run start" does not work. Returns "sh 1 ./node_modules/.bin/electron not found":

            at which point will I need to use the manual method you referenced above

            maybe

            we made electron install optional, as its not available on pi0w(armv6l) anymore
            and the install would fail if not optional

            and I made a setup for using another browser over the MM server instead
            (and use it when I detect electron wasn’t installed, see the external_browser config at the bottom of the scripts page)

            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 Dec 11, 2024, 4:24 PM

              Awesome, I will update once I have an opportunity to try this. Thank you.

              T 1 Reply Last reply Dec 12, 2024, 4:31 AM Reply Quote 0
              • T Offline
                tony-72 @tony-72
                last edited by Dec 12, 2024, 4:31 AM

                @sdetweil, Ok, so this is what I get when I ran your script as suggested…
                install log being saved to /home/Hastyhome/install.log
                Updating packages …
                W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.IzBHn1 - IsAccessibleBySandboxUser (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.s8By5q - IsAccessibleBySandboxUser (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm_InRelease - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian-security_dists_bookworm-security_InRelease - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian-security_dists_bookworm-security_Release - PrepareFiles (74: Bad message)
                E: The repository ‘http://deb.debian.org/debian-security bookworm-security Release’ no longer has a Release file.
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages.xz - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-armhf_Packages.xz - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages.xz - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-armhf_Packages.xz - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages - PrepareFiles (74: Bad message)
                Update failed, retrying installation …
                Installing helper tools …
                W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.Kd9RjG - IsAccessibleBySandboxUser (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/.apt-acquire-privs-test.Ipb98I - IsAccessibleBySandboxUser (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm_InRelease - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian-security_dists_bookworm-security_InRelease - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian-security_dists_bookworm-security_Release - PrepareFiles (74: Bad message)
                E: The repository ‘http://deb.debian.org/debian-security bookworm-security Release’ no longer has a Release file.
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-armhf_Packages.xz - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages.xz - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-armhf_Packages.xz - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages.xz - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages - PrepareFiles (74: Bad message)
                W: Problem unlinking the file /var/lib/apt/lists/partial/deb.debian.org_debian_dists_bookworm-updates_main_binary-arm64_Packages - PrepareFiles (74: Bad message)

                S 1 Reply Last reply Dec 12, 2024, 4:45 AM Reply Quote 0
                • S Away
                  sdetweil @tony-72
                  last edited by sdetweil Dec 12, 2024, 4:48 AM Dec 12, 2024, 4:45 AM

                  @tony-72 what image are you using? on what device?

                  i have not seen that on any system

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  T 2 Replies Last reply Dec 12, 2024, 4:52 AM Reply Quote 0
                  • T Offline
                    tony-72 @sdetweil
                    last edited by Dec 12, 2024, 4:52 AM

                    @sdetweil Well thats disheartening, lol. I am rebooting, will sudo apt-get update and upgrade again. Then I will try your script again to see if I get anything different.

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      tony-72 @sdetweil
                      last edited by Dec 12, 2024, 4:57 AM

                      @sdetweil I am using the Raspberry pi OS 64 (recommended) on a Raspberry pi 4 model B. Using a micro SD and Raspberry pi imager to flash the SD card.

                      S 1 Reply Last reply Dec 12, 2024, 5:56 PM Reply Quote 0
                      • S Away
                        sdetweil @tony-72
                        last edited by Dec 12, 2024, 5:56 PM

                        @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
                        • 1
                        • 2
                        • 1 / 2
                        1 / 2
                        • First post
                          1/14
                          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