MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED npm dependencies not installed on fresh MM2 installation

    Troubleshooting
    3
    10
    1962
    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.
    • M
      MWel1977 last edited by MWel1977

      Because I was having problems with some modules I decided to format my micro SD card and start all over again with my test enviroment on the Pi 3A+ (My working mirror runs on my Pi 3B+ 😉 )

      However I just run the installation of the MM2 command bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)" but when it got to “Installing dependencies” it run into an error:
      bash: line 112: npm: command does not exist. Unable to install dependencies!
      (well it’s translated from Dutch. Could also be “Command not found”)

      anybody got an idea what is going on?

      1 Reply Last reply Reply Quote 0
      • M
        MWel1977 last edited by

        UPDATE:
        SUCCES!!! YES!!!:smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_smiling_eyes:
        I just had to install npm in the MagicMirror folder!
        My test bed for the MagicMirror is running again! :face_with_stuck-out_tongue_winking_eye: :face_with_stuck-out_tongue_winking_eye: :face_with_stuck-out_tongue_winking_eye:

        1 Reply Last reply Reply Quote 2
        • S
          sdetweil last edited by

          yes, some of the platforms (Pi Stretch for example) are not installing npm and/or node as part of their initial installs…

          see here https://www.battlehillmedia.com/installing-node-js-and-npm-on-raspberry-pi-3/

          Sam

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 2
          • Sandy2503
            Sandy2503 last edited by

            have you installed the full raspian jessie or the lite version ?

            M 1 Reply Last reply Reply Quote 0
            • M
              MWel1977 @Sandy2503 last edited by

              @sandy2503 I’ve used: Raspbian Stretch with desktop and recommended software.
              and I’m just up and running again. Meaning I’ve Rasbian setup on my Pi 3A+ and typing this in the Chromium browser.
              First I’ll try to install the MagicMirror. Yesterday I installed it at work via an open network (guest login)
              and at random times one is thrown out of it. So that could also be an issue.
              Now I’m at home in my own network.
              So fingers crossed!

              1 Reply Last reply Reply Quote 0
              • M
                MWel1977 last edited by

                NOPE! It’s not due to poor geust network at work. I still can’t install the Dependencies.
                I do have Node because node -v is resulting in v8.11.1.
                but it can’t find npm. so I’ll install npm meself.

                1 Reply Last reply Reply Quote 0
                • M
                  MWel1977 last edited by

                  I’m starting to get angry!!!

                  pi@raspberrypi:~/MagicMirror $ git pull
                  Already up-to-date.
                  pi@raspberrypi:~/MagicMirror $ npm start
                  
                  > magicmirror@2.6.0 start /home/pi/MagicMirror
                  > sh run-start.sh
                  
                  run-start.sh: 4: run-start.sh: electron: not found
                  npm ERR! file sh
                  npm ERR! code ELIFECYCLE
                  npm ERR! errno ENOENT
                  npm ERR! syscall spawn
                  npm ERR! magicmirror@2.6.0 start: `sh run-start.sh`
                  npm ERR! spawn ENOENT
                  npm ERR! 
                  npm ERR! Failed at the magicmirror@2.6.0 start script.
                  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                  npm WARN Local package.json exists, but node_modules missing, did you mean to install?
                  
                  npm ERR! A complete log of this run can be found in:
                  npm ERR!     /home/pi/.npm/_logs/2019-01-17T22_37_37_361Z-debug.log
                  pi@raspberrypi:~/MagicMirror $ 
                  

                  Now it can’t find Electron. 😤 😤 😠

                  1 Reply Last reply Reply Quote 0
                  • M
                    MWel1977 last edited by

                    UPDATE:
                    Found that npm i electron in the folder “MagicMirror” does the trick.
                    But now it “ENOENT” that’s causing problems!

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

                      @mwel1977 said in npm dependencies not installed on fresh MM2 installation:

                      But now it “ENOENT” that’s causing problems!

                      ENOENT is file not found…

                      can u post the full error…

                      Sam

                      Create a working config
                      How to add modules

                      1 Reply Last reply Reply Quote 0
                      • M
                        MWel1977 last edited by

                        UPDATE:
                        SUCCES!!! YES!!!:smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_smiling_eyes: :smiling_face_with_open_mouth_smiling_eyes:
                        I just had to install npm in the MagicMirror folder!
                        My test bed for the MagicMirror is running again! :face_with_stuck-out_tongue_winking_eye: :face_with_stuck-out_tongue_winking_eye: :face_with_stuck-out_tongue_winking_eye:

                        1 Reply Last reply Reply Quote 2
                        • S
                          sdetweil last edited by

                          great news… thanks for the feedback

                          Sam

                          Create a working config
                          How to add modules

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