Complete Setup tutorial: npm command not found / unable to install dependencies



  • Hi there,

    I´m trying to install MM2 for quite a while now following this superb tutorial in detail: https://forum.magicmirror.builders/topic/236/complete-setup-tutorial/6

    It works just excellent until I reach the section “Installing Magic Mirror²” using the command curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash

    Starting the installation ends up with the message:

    Installing helper tools ...
    Paketlisten werden gelesen... Fertig
    Abhängigkeitsbaum wird aufgebaut.       
    Statusinformationen werden eingelesen.... Fertig
    build-essential ist schon die neueste Version.
    curl ist schon die neueste Version.
    git ist schon die neueste Version.
    git wurde als manuell installiert festgelegt.
    unzip ist schon die neueste Version.
    wget ist schon die neueste Version.
    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
    Check current Node installation ...
    Node currently installed. Checking version number.
    Minimum Node version: v5.1.0
    Installed Node version: v0.10.29
    Node should be upgraded.
    Installing Node.js ...
    Paketlisten werden gelesen... Fertig
    Abhängigkeitsbaum wird aufgebaut.       
    Statusinformationen werden eingelesen.... Fertig
    nodejs ist schon die neueste Version.
    nodejs wurde als manuell installiert festgelegt.
    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
    Node.js installation Done!
    Cloning MagicMirror ...
    Klone nach 'MagicMirror'...
    remote: Counting objects: 3864, done.
    remote: Compressing objects: 100% (19/19), done.
    remote: Total 3864 (delta 7), reused 0 (delta 0), pack-reused 3845
    Empfange Objekte: 100% (3864/3864), 10.29 MiB | 96.00 KiB/s, Fertig.
    Löse Unterschiede auf: 100% (1977/1977), Fertig.
    Prüfe Konnektivität... Fertig.
    Cloning MagicMirror Done!
    Installing dependencies ...
    bash: Zeile 108: npm: Kommando nicht gefunden.
    Unable to install dependencies
    

    When I try to start MM it ends up with the errormessage that npm is an unknown command.

    Is this problem already known? What can I do to solve this issue?

    Thanks a lot for your help!!


    Note from admin: Please use Markdown on code snippets for easier reading!



  • According to the installation messages the installed Node version (v0.10.29) seems to be too old for the minium requirements for MagicMirror (v5.1.0). What I do not understand is why the autoautomatic update of node does not work.

    I´m using the 2016-05-27 Raspbian version of jessie. Did anybody make similar experiences with this version? If so, how did you solve this issue? Any help is highly appreciated!
    Frank


  • Moderator

    After translating, this is what I see:

    Reading package lists ... Done
    Dependency tree.
    Status information can be read ... Done
    NodeJS is already the newest version.
    NodeJS was defined as installed manually.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Node.js installation Done!
    

    So somewhere, somehow, your node installation is marked as non-upgradable through apt-get. I just tried with a fresh rpi, grabbed the most recent version of Rasbian listed on the Raspberry website and everything ran just fine. I’m not sure what to tell you here …



  • I had same problem so I ran this:

    curl -L https://npmjs.org/install.sh | sudo sh



  • @Mr.Meeseeks said in Complete Setup tutorial: npm command not found / unable to install dependencies:

    I had same problem so I ran this:

    curl -L https://npmjs.org/install.sh | sudo sh

    Thanks a lot. But when I run this I get the message that the certificate is not yet valid and if I´d like to turn off the curl´s verification of the certificate I have to use the -k option. Any hints about that?



  • @Blamer I guess then use http:// instead, odd I didn’t get that.



  • Oh I know, check that your system date and time is correct.

    If there is internet connection available follow the steps to set the date:

    1. sudo raspi-config
    2. Internationalization options
    3. Change Time Zone
    4. Select geographical area
    5. Select city or region.
    6. Reboot your pi.

    Maybe:
    sudo date -s “19 SEP 2016 20:37:00”



  • @Mr.Meeseeks said in Complete Setup tutorial: npm command not found / unable to install dependencies:

    Oh I know, check that your system date and time is correct.

    If there is internet connection available follow the steps to set the date:

    1. sudo raspi-config
    2. Internationalization options
    3. Change Time Zone
    4. Select geographical area
    5. Select city or region.
    6. Reboot your pi.

    Maybe:
    sudo date -s “19 SEP 2016 20:37:00”

    Excellent! For some reason I wasn´t able to set the correct time and date via raspi-config. Using sudo date -s “19 SEP 2016 20:37:00” solved the problem. After that I was able to run curl -L https://npmjs.org/install.sh | sudo sh. The install script curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash went through just like a charm!
    Although I still do not understand the connection between the wrong set time and date and the installation I´m very happy to run MM now. Now I have to configure the modules.
    –> A WORLD OF THANKS TO YOU!!



  • Wicked!
    Ya the date time solved the https certificate issue. I also don’t know why we had to install npm manually and no one else did. Oh well, I’m sure this thread will help others👍


  • Module Developer

    Honestly what I would do is format the SD card put the rasp img on the SD card then open a terminal window and do the

    sudo apt-get update
    sudo apt-get upgrade

    then go to installing the mirror via the install script.


    Note from admin: Please use Markdown on code snippets for easier reading!


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.