• 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.

Unable to install dependencies - npm not found

Scheduled Pinned Locked Moved Unsolved Troubleshooting
5 Posts 5 Posters 5.5k Views 5 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.
  • W Offline
    wickedflow
    last edited by Dec 22, 2018, 1:36 AM

    I’m trying to install Magic Mirror and when I type in the bash url, it says

    Installing dependencies …
    bash: line 112: npm: command not found
    Unable to install dependencies!

    M 1 Reply Last reply Dec 22, 2018, 2:15 AM Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer @wickedflow
      last edited by Dec 22, 2018, 2:15 AM

      @wickedflow

      Try installing node.js, and so, npm to latest stable version. Then, try the MM installer script again.

      Worst case scenario, manually install MM.

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 1
      • J Offline
        jstewart-amd
        last edited by Dec 27, 2018, 6:23 PM

        I had the same issue. Node.js was on the system, but apparently not npm. I tried installing just npm with sudo apt-get install npm, but this seemed to grab an incompatible version of npm. After this, the MagicMirror installation script got further than the first attempt, but still did not install the dependencies without error. So, don’t do that.

        Instead, remove/purge Node.js and grab latest, as @Mykle1 suggests:

        sudo apt-get remove --purge nodejs
        sudo apt autoremove
        curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
        sudo apt-get install -y nodejs
        

        This should install Node.js and npm. Once the installation finishes, sanity check the install with the following commands:

        node -v
        npm -v
        

        Then, delete the MagicMirror folder from your previous installation attempt:

        rm -rf ~/MagicMirror/
        

        And try the MagicMirror installation script again.
        It installed successfully for me after this. Raspberry Pi 3 running Raspbian Stretch (in case that matters).

        1 Reply Last reply Reply Quote 5
        • R Offline
          reddyman
          last edited by Dec 30, 2018, 5:25 AM

          Thanks, that worked perfectly for me! I had the same issue.

          Although now I am forced to use no Open GL driver for the MM to start up properly…well hopefully electron still doesn’t use massive amounts of CPU power to run without it now.

          1 Reply Last reply Reply Quote 0
          • M Offline
            makepluscode
            last edited by makepluscode Dec 30, 2018, 3:01 PM Dec 30, 2018, 2:58 PM

            Re: Unable to install dependencies - npm not found

            With Rasbian of 2018-11-13, I had the same issue. So I installed only npm,

            sudo apt-get install npm
            sudo npm install -g npm@latest
            

            Also I used the pre-built node which is 8.x in the latest version of Rasbian.
            While I install, I made a video and please check https://youtu.be/UBgH5hejYtM.

            Thanks,

            Dependency Versions

            1. OS : 2018-11-13-raspbian-stretch-full.img
            2. MagicMirror2 : 2.5.0
            3. MMM-Hotword : 1.1.0
            4. MMM-AssistantMk2 : 2.1.2
            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              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