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.

    MM won't run - "ENOENT: no such file or directory, open '/home/pi/package.json'"

    Scheduled Pinned Locked Moved Troubleshooting
    2 Posts 2 Posters 4.2k Views 1 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.
    • X Offline
      xy86
      last edited by

      Hi all,

      Pretty new to both Linux and MM, but bought an RPI specifically for this project, as I think it’s an awesome idea.
      I’ve been looking into the forum for others with the same problems, and were encouraged to start a new thread - so here goes.

      I initially had issues with the config file, but I managed to screw up my hardware config, rendering the Raspbian install useless. So I took the newbie and easy way out - wipe and reinstall.

      I’ve followed the guide at https://forum.magicmirror.builders/topic/236/complete-setup-tutorial/ - except from the part where I update and remove unused packages.

      It seems to me that MM installs fine, but when I try starting it, I get this error output after doing display=:0 npm start :

      Dependencies installation Done!
      Check plymouth installation ...
      Splashscreen: Checking themes directory.
      Splashscreen: Create theme directory if not exists.
      Splashscreen: Theme copied successfully.
      Splashscreen: Changed theme to MagicMirror successfully.
       
      We're ready! Run DISPLAY=:0 npm start from the ~/MagicMirror directory to start your MagicMirror.
       
       
      pi@raspberrypi:~ $ 
      pi@raspberrypi:~ $ display=:0 npm start
      npm ERR! Linux 4.4.50-v7+
      npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
      npm ERR! node v6.10.1
      npm ERR! npm  v3.10.10
      npm ERR! path /home/pi/package.json
      npm ERR! code ENOENT
      npm ERR! errno -2
      npm ERR! syscall open
      
      npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
      npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
      npm ERR! enoent This is most likely not a problem with npm itself
      npm ERR! enoent and is related to npm not being able to find a file.
      npm ERR! enoent 
      
      npm ERR! Please include the following file with any support request:
      npm ERR!     /home/pi/npm-debug.log
      pi@raspberrypi:~ $ apt-get install nodejs
      E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
      E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
      pi@raspberrypi:~ $ sudo apt-get install nodejs
      Reading package lists... Done
      Building dependency tree        
      Reading state information... Done
      nodejs is already the newest version.
      The following packages were automatically installed and are no longer required:
        libc-ares2 libv8-3.14.5
      Use 'apt-get autoremove' to remove them.
      0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
      
      

      I tried installing/upgrading node.js, but it just throws an error saying that it’s already at the newest build.

      Any ideas to what I’m doing wrong - or help - would be highly appreciated.

      Thank you. :)

      brobergB 1 Reply Last reply Reply Quote 0
      • brobergB Offline
        broberg Project Sponsor @xy86
        last edited by broberg

        @xy86 you have to get in to the magic mirror folder first before you can run npm start

        Ie type
        cd MagicMirror
        And then
        npm start

        Or
        display=:0 npm start
        If you are running it via ssh

        1 Reply Last reply Reply Quote 2
        • 1 / 1
        • 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