• 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 start error?

Scheduled Pinned Locked Moved Troubleshooting
13 Posts 5 Posters 9.8k 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.
  • L Offline
    longod @romain
    last edited by Apr 27, 2017, 2:32 PM

    @romain v4.2.1

    R 1 Reply Last reply Apr 27, 2017, 2:35 PM Reply Quote 0
    • R Offline
      romain @longod
      last edited by Apr 27, 2017, 2:35 PM

      @longod I’m using the v7.9.0 . try to install an higher version of node

      L 1 Reply Last reply Apr 27, 2017, 3:03 PM Reply Quote 0
      • S Offline
        strawberry 3.141 Project Sponsor Module Developer @longod
        last edited by Apr 27, 2017, 2:44 PM

        @longod try npm install --unsafe-perm

        Please create a github issue if you need help, so I can keep track

        L 1 Reply Last reply Apr 27, 2017, 3:08 PM Reply Quote 0
        • L Offline
          longod @romain
          last edited by Apr 27, 2017, 3:03 PM

          @romain Okay I’ve updated to v7.7.1. I then tried DISPLAY=0: npm start and I got a similar message as before, however there is no longer a ERR! node v4.2.1 message, it skips over that part. Some progress!

          1 Reply Last reply Reply Quote 0
          • L Offline
            longod @strawberry 3.141
            last edited by Apr 27, 2017, 3:08 PM

            @strawberry-3.141 I gave that a go and checked npm -v, now its at 4.5.0 and is in the same boat as the node message that I was getting when I try to do DISPLAY=0: npm start. There still is the rest of the npm ERR! messages, just not the npm ERR! node v4.2.1 and npm ERR! npm v2.14.7

            1 Reply Last reply Reply Quote 0
            • L Offline
              longod
              last edited by Apr 27, 2017, 3:32 PM

              I realized that it is telling me to go to a different log now when I do npm start, which is npm ERR! /home/pi/.npm/_logs/2017-04-27T15_23_04_547Z-debug.log. In there it gives me this message:

              0 info it worked if it ends with ok
              1 verbose cli [ '/opt/nodejs/bin/node', '/usr/local/bin/npm', 'start' ]
              2 info using npm@4.5.0
              3 info using node@v7.7.1
              4 verbose run-script [ 'prestart', 'start', 'poststart' ]
              5 info lifecycle magicmirror@2.1.1~prestart: magicmirror@2.1.1
              6 silly lifecycle magicmirror@2.1.1~prestart: no script for prestart, continuing
              7 info lifecycle magicmirror@2.1.1~start: magicmirror@2.1.1
              8 verbose lifecycle magicmirror@2.1.1~start: unsafe-perm in lifecycle true
              9 verbose lifecycle magicmirror@2.1.1~start: PATH: /opt/nodejs/lib/node_modules/npm/bin/node-gyp-bin:/home/pi/MagicMirror/node_modules/.bin:/usr/local/sbin:/usr/local/$
              10 verbose lifecycle magicmirror@2.1.1~start: CWD: /home/pi/MagicMirror
              11 silly lifecycle magicmirror@2.1.1~start: Args: [ '-c', 'sh run-start.sh' ]
              12 info lifecycle magicmirror@2.1.1~start: Failed to exec start script
              13 verbose stack Error: magicmirror@2.1.1 start: `sh run-start.sh`
              13 verbose stack spawn ENOENT
              13 verbose stack     at ChildProcess. (/opt/nodejs/lib/node_modules/npm/lib/utils/spawn.js:33:16)
              13 verbose stack     at emitTwo (events.js:106:13)
              13 verbose stack     at ChildProcess.emit (events.js:194:7)
              13 verbose stack     at maybeClose (internal/child_process.js:899:16)
              13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
              14 verbose pkgid magicmirror@2.1.1
              15 verbose cwd /home/pi/MagicMirror
              16 verbose Linux 4.4.50+
              17 verbose argv "/opt/nodejs/bin/node" "/usr/local/bin/npm" "start"
              18 verbose node v7.7.1
              19 verbose npm  v4.5.0
              20 error file sh
              21 error code ELIFECYCLE
              22 error errno ENOENT
              23 error syscall spawn
              24 error magicmirror@2.1.1 start: `sh run-start.sh`
              24 error spawn ENOENT
              25 error Failed at the magicmirror@2.1.1 start script 'sh run-start.sh'.
              25 error Make sure you have the latest version of node.js and npm installed.
              25 error If you do, this is most likely a problem with the magicmirror package,
              25 error not with npm itself.
              25 error Tell the author that this fails on your system:
              25 error     sh run-start.sh
              25 error You can get information on how to open an issue for this project with:
              

              I’m lost on what to do next…

              1 Reply Last reply Reply Quote 0
              • A Offline
                adil
                last edited by May 31, 2017, 10:11 PM

                Hi @longod, I have just installed MM on my Rpi 0 and I’m facing the exact same issue as you. Did you finally find the solution ??
                Thanks!

                A 1 Reply Last reply May 31, 2017, 10:27 PM Reply Quote 0
                • A Offline
                  adil @adil
                  last edited by May 31, 2017, 10:27 PM

                  @adil It looks like the issue was linked to missing modules like clock.
                  After I went to the vendor folder and installed using npm (see command below), I was able to launch MM successfully.

                  cd ~/MagicMirror/vendor
                  npm install
                  1 Reply Last reply Reply Quote 1
                  • 1
                  • 2
                  • 1 / 2
                  • First post
                    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