• 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 ERR!

Scheduled Pinned Locked Moved Solved Troubleshooting
8 Posts 3 Posters 4.0k 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.
  • M Offline
    MagicCrumps1
    last edited by Jun 6, 2016, 3:06 AM

    I’m not entirely sure why I am getting this error but I tried uninstalling and reinstalling node.js several times and of course, it has not fixed the issue. Then I saw a thread where MichMich said that the automatic installer should automatically install the latest node.js. At which point, I decided to run the automatic installer again “curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash”. It still does not work. I’m not sure what I am doing wrong but if you can spare a few minutes to help me i am more than grateful.

    0_1465182280222_Capture.PNG

    1 Reply Last reply Reply Quote 0
    • K Offline
      KirAsh4 Moderator
      last edited by Jun 6, 2016, 3:58 AM

      A couple of things are standing out from that screen grab:

      • You need to update your Raspbian installation by running 'sudo apt-get update ; sudo apt-get upgrade'
      • You appear to have an installation already for MagicMirror. If this was your failed one, go ahead and delete it and start over. All you need to do is run the automatic installer which takes care of checking and installing missing packages
      • At the bottom of your screen, where it says 'no such file or directory, open /home/pi/package.json', that’s because you are trying to start MM outside of its folder. You need to do that inside of it.

      My recommended steps:

      • Remove the current MagicMirror folder that you have: 'sudo rm -rf MagicMirror'
      • Run the automatic installer script, 'curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash'
      • When that finishes, change folder into the MagicMirror one: 'cd MagicMirror'
      • Try running it from there: 'npm start'

      If that fails, try running an 'npm install' in case, for some weird reason, something didn’t install. When that’s done running, try running 'npm start' again. At this point, either MM will come up telling you that you need to create a configuration, or it will, once again, fail. If it’s the latter, capture the screen and post it.

      A Life? Cool! Where can I download one of those from?

      1 Reply Last reply Reply Quote 0
      • M Offline
        MagicCrumps1
        last edited by Jun 6, 2016, 5:02 AM

        Hi KarAsh4,

        Thank you so much for writing such detailed instructions. Let me recap:

        1. Update raspian ‘sudo apt-get update ; sudo apt-get upgrade’
        2. Delete and reinstall auto installation
          a) ‘sudo rm -rf MagicMirror’
          b) ‘curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash’’
        3. Perform ‘display:0 npm start’ inside MagicMirror by going running ‘cd MagicMirror’

        Is this correct?

        I have no programming background :(

        1 Reply Last reply Reply Quote 0
        • K Offline
          KirAsh4 Moderator
          last edited by Jun 6, 2016, 5:08 AM

          If you’re running this while logged in to the rPi (through the console), then you don’t need the 'DISPLAY=:0' part. However, something to note: if you are logged into the rPi from the console (so you have a keyboard connected that you are logging in to it), the moment you run 'npm start' and it successfully starts MM, you lose the ability to use anything else. There are keyboard shortcuts that you can hit to get back to the console but someone else will have to tell you those as I don’t know them off the top of my head.

          Ideally you would be connected to the rPi through a different machine on the same network. So you would SSH into the rPi, log in as the 'pi' user, and then you DO need to set the display: 'DISPLAY=:0' portion - note that it’s case specific!

          So, to recap, yes to what you listed above, with the small caveat on #3.

          A Life? Cool! Where can I download one of those from?

          M E 2 Replies Last reply Jun 6, 2016, 6:14 AM Reply Quote 0
          • M Offline
            MagicCrumps1 @KirAsh4
            last edited by Jun 6, 2016, 6:14 AM

            @KirAsh4 OMG THE DISPLAY WORKS! I’m super grateful for your help. It says that that I need to create a config file. The github instruction is not entirely clear on what I will need to do next. Do I duplicate the config file?

            1 Reply Last reply Reply Quote 0
            • K Offline
              KirAsh4 Moderator
              last edited by Jun 6, 2016, 6:18 AM

              From here, you need to follow the configuration section: https://github.com/MichMich/MagicMirror#configuration

              You can start by simply renaming the file from 'config.js.sample' to 'config.js' and restart the MagicMirror process. After that, you can start playing with the config file, disabling or (re)enabling modules, adding new ones … this is what you get to play with it.

              A Life? Cool! Where can I download one of those from?

              1 Reply Last reply Reply Quote 0
              • E Offline
                EoF @KirAsh4
                last edited by Jun 6, 2016, 9:01 PM

                @KirAsh4 as a note on this reply, Alt + F2 (I think) will bring up the run dialog box from which you can launch lxterminal.

                K 1 Reply Last reply Jun 6, 2016, 9:35 PM Reply Quote 0
                • K Offline
                  KirAsh4 Moderator @EoF
                  last edited by Jun 6, 2016, 9:35 PM

                  @EoF, awesome. Thanks for that. Someone should start collecting all the various keyboard shortcuts and compile them in one post, possibly even on the wiki page. I’ve seen CTRL-W posted, this ALT-F2. One can also completely switch to a virtual console and back to the GUI by hitting CTRL-ALT-F[1-7] …

                  A Life? Cool! Where can I download one of those from?

                  1 Reply Last reply Reply Quote 1
                  • 1 / 1
                  1 / 1
                  • First post
                    1/8
                    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