• 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
  1. Home
  2. xy86
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
X
Offline
  • Profile
  • Following 0
  • Followers 0
  • Topics 1
  • Posts 4
  • Groups 0

xy86

@xy86

0
Reputation
407
Profile views
4
Posts
0
Followers
0
Following
Joined Mar 25, 2017, 5:54 PM
Last Online Apr 29, 2018, 3:10 PM

xy86 Unfollow Follow

Latest posts made by xy86

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

    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. :)

    posted in Troubleshooting
    X
    xy86
    Mar 26, 2017, 7:41 PM
  • RE: messed up my config.. MM tells me to create a config file

    @johnnyboy Thanks - I should have learned that by now, but… Haha. You know.

    I ended up re-installing Raspbian as i messed up something so the wifi-card wasn’t recognized anymore.
    I also followed the step-by-step guide at https://forum.magicmirror.builders/topic/236/complete-setup-tutorial/6 and got by the cleaning process. I then tried installing apache2 and PHP5 again; getting the same error as the one below.

    When I try installing MM now, I get these errors:

    Installing helper tools ...
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    build-essential is already the newest version.
    curl is already the newest version.
    git is already the newest version.
    unzip is already the newest version.
    wget is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Can't set locale; make sure $LC_* and $LANG are correct!
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    	LANGUAGE = (unset),
    	LC_ALL = (unset),
    	LC_CTYPE = "UTF-8",
    	LANG = "en_GB.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    Setting up libpam-chksshpwd:armhf (1.1.8-3.1+deb8u2+rpi2) ...
    mkdir: cannot create directory '/var/lib/chksshpwd/': File exists
    dpkg: error processing package libpam-chksshpwd:armhf (--configure):
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     libpam-chksshpwd:armhf
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    I tried googling the error, but I’m not sure if I’m on the right track with solutions described.

    Any ideas?

    posted in Troubleshooting
    X
    xy86
    Mar 25, 2017, 11:27 PM
  • RE: messed up my config.. MM tells me to create a config file

    @johnnyboy Thanks for the leads! I’ll have a look at it.
    I didn’t change the original file (or at least, I don’t think I did) - except for the alterations with keys and the Ruter-addon.

    Stupid question: Is the config.js file supposed to be in the config folder, or should there be a /config/config (ie another folder called config) that contains the config.js ?

    posted in Troubleshooting
    X
    xy86
    Mar 25, 2017, 7:12 PM
  • RE: messed up my config.. MM tells me to create a config file

    Hey,

    I have some issues here too. Not very familiar with Linux and just got my first RPI, for this project specifically :)

    I’ve been trying for hours now to get this to work, but MM just says that I need a working config file. I’ve tried editing the text in Sublime (I find it easier to read than the built in texteditor on Raspbian), but I can’t seem to find the errors.

    I’m attaching the contents of my config file, minus the tokens and stuff:

    /* Magic Mirror Config Sample
     *
     * By Michael Teeuw http://michaelteeuw.nl
     * MIT Licensed.
     */
    
    var config = {
    	port: 8080,
    	address: 192.168.86.131,
    	ipWhitelist: ["192.168.86.100", "192.168.86.150"],
    
    	language: "en",
    	timeFormat: 24,
    	units: "metric",
    
    	modules: [
    		{
    			module: "alert",
    		},
    		{
    			module: "updatenotification",
    			position: "top_bar"
    		},
    		{
    			module: "clock",
    			position: "top_left"
    		},
    		{
    			module: "calendar",
    			header: "Kalender",
    			position: "top_left",
    			config: {
    				calendars: [
    					{
    						symbol: "calendar-check-o",
    						url: "https://calendar.google.com/calendar/the_rest_of_my_calendars_URL"
    					}
    				]
    			}
    		},
    		{
    			module: "compliments",
    			position: "lower_third"
    		},
    		{
    			module: "currentweather",
    			position: "top_right",
    			config: {
    				location: "Kongsvinger",
    				locationID: "3149533",  //ID from http://www.openweathermap.org
    				appid: "MY-TOKEN-HERE"
    			}
    		},
    		{
    			module: "weatherforecast",
    			position: "top_right",
    			header: "Weather Forecast",
    			config: {
    				location: "Kongsvinger",
    				locationID: "3149533",  //ID from http://www.openweathermap.org
    				appid: "MY-TOKEN-HERE"
    			}
    		},
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    					{
    						title: "NRK Siste nytt",
    						url: "http://www.nrk.no/nyheter/siste.rss"
    					}
    				],
    				showSourceTitle: true,
    				showPublishDate: true
    			}
    		},
    	]
    
    }
    
    {
    	module: "MMM-Ruter",
    	header: "Reisetider",
    	position: "top_left",
    	config: {
    		showPlatform: true, 
    		maxItems: 10,
    		stops: [
    			{
    				stopId: "4024715",
    				platforms: [ "1", "2" ],
    				timeToThere: 5
    			}
    			{
    				stopId: "4020080",
    				platforms: [ "1", "2" ],
    				timeToThere: 0
    			}
    			
    		]
    	}
    };
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== "undefined") {module.exports = config;}
    
    

    Any help is highly appreciated!

    posted in Troubleshooting
    X
    xy86
    Mar 25, 2017, 5:58 PM
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