MagicMirror² v2.14.0 is available! For more information about this release, check out this topic.

Config Error

  • /* Magic Mirror Config Sample
     * By Michael Teeuw
     * MIT Licensed.
     * For more information on how you can configure this file
     * See
    var config = {
    	address: "localhost", // Address to listen on, can be:
    	                      // - "localhost", "", "::1" to listen on loopback interface
    	                      // - another specific IPv4/6 to listen on a specific interface
    	                      // - "", "::" to listen on any interface
    	                      // Default, when address config is left out or empty, is "localhost"
    	port: 8080,
    	ipWhitelist: ["", "::ffff:", "::1"], // Set [] to allow all IP addresses
    	                                                       // or add a specific IPv4 of :
    	                                                       // ["", "::ffff:", "::1", "::ffff:"],
    	                                                       // or IPv4 range of --> use CIDR format :
    	                                                       // ["", "::ffff:", "::1", "::ffff:"],
    	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
    	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
    	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
    	language: "en",
    	timeFormat: 24,
    	units: "metric",
    	// serverOnly:  true/false/"local" ,
    			     // local for armv6l processors, default
    			     //   starts serveronly and then starts chrome browser
    			     // false, default for all  NON-armv6l devices
    			     // true, force serveronly mode, because you want to.. no UI on this device
    	modules: [
    			module: "alert",
    			Position: "right"
    			Welcome_message "string"
    			module: "updatenotification",
    			position: "top_bar"
    			module: "clock",
    			position: "top_left"
    			module: "calendar",
    			header: "US Holidays",
    			position: "top_left",
    			config: {
    				calendars: [
    						symbol: "calendar-check",
    						url: "webcal://"					}
    			module: "compliments",
    			position: "lower_third"config: {
    			compliments: {
    				morning: [
    					"Good Morning My Lord",
    					"Have The Best Day Ever:)",
    					"Ten is such a weird number..."
    				afternoon: [
    					"Good Afternoon!",
    					"Welcome to Apollonis!",
    					"I am under maintainance please excersise caution"
    				evening: [
    					"Good Evening, Sir!",
    					"You Are In Control, Sir."
    			remoteFile: null,
    			fadeSpeed: 4000,
    			morningStartTime: 3,
    			morningEndTime: 12,
    			afternoonStartTime: 12,
    			afternoonEndTime: 17
    			module: "currentweather",
    			position: "top_right",
    			config: {
    				location: "West Des Moines",
    				locationID: "4881346", //ID from; unzip the gz file and find your city
    				appid: "4900f833e3e07ddd3b769d933245d37a"
    			module: "weatherforecast",
    			position: "top_right",
    			header: "Weather Forecast",
    			config: {
    				location: "West Des Moines",
    				locationID: "5128581", //ID from; unzip the gz file and find your city
    				appid: "4900f833e3e07ddd3b769d933245d37a"
    			module: "newsfeed",
    			position: "bottom_bar",
    			config: {
    				feeds: [
    						title: "New York Times",
    						url: ""
    				showSourceTitle: true,
    				showPublishDate: true,
    				broadcastNewsFeeds: true,
    				broadcastNewsUpdates: true
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== "undefined") {module.exports = config;}
    I keep getting error screens and it wont even let me run the magic mirror!
    I changed the weather stuff and the compliments. I have no experience with coding. 
    I also get this when i ran a check.
    pi@raspberrypi:~ $ npm run config:check
    npm ERR! code ENOENT
    npm ERR! syscall open
    npm ERR! path /home/pi/package.json
    npm ERR! errno -2
    npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent 
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/pi/.npm/_logs/2020-05-20T01_00_43_703Z-debug.log

    Thanks in advance!!!

  • also should I have posted those Ip Adresses?

  • @PHAGE-GOV said in Config Error:

    path /home/pi/package.json

    means you are not in the MagicMirror folder before npm, start

    the apid id/keys should be changed to ****

    also, please use the markdown around config or code blacks, paste into editor, select all, the hit the button that looks like </>

  • @sdetweil i will do that in the future!
    but how do i go into the MM folder before NPM?
    and also literally change the Keys to the asterisks?

  • @PHAGE-GOV you open a terminal window on the desktop ctrl-alt-T, and then cd MagicMirror
    (just like you would do on Windows)

    or ssh into the pi from your windows pc, and THEN

    cd MagicMirror

    yes, when displaying on the forum, we request you hide sensitive info. (like to calendars, email, …)
    if u paid for your apikey and gave it away to anyone that can cut/paste, you MIGHT be unhappy!

    google apikeys are based on usage… have a couple hundred people using YOUR apikey might cost you

  • @sdetweil yeah, so note to self for the future lol
    so literally type “cd magic mirror” and that should fix it?
    and also change my api key in the future, not in the config file, right?

  • @PHAGE-GOV in the config file the apikey should be ok, only when u paste config to the forum should u blank it out…

    linux is case sensitive, so its

    cd MagicMirror

  • @sdetweil so i did the cd Magic Mirror and then ran pm2 start/
    and i got a pm2 error “script not found: home/pi/MagicMirror/”

  • @sdetweil well i tried lol

    [2020-05-20 17:25:02.499] [LOG]    Starting MagicMirror: v2.11.0
    [2020-05-20 17:25:02.506] [LOG]    Loading config ...
    [2020-05-20 17:25:02.510] [ERROR]  WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:41
    			Welcome_message "string"
    SyntaxError: Unexpected identifier
        at Module._compile (internal/modules/cjs/loader.js:722:23)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
        at Module.load (internal/modules/cjs/loader.js:645:32)
        at Function.Module._load (internal/modules/cjs/loader.js:560:12)
        at Module.require (internal/modules/cjs/loader.js:685:19)
        at require (internal/modules/cjs/helpers.js:16:16)
        at loadConfig (/home/pi/MagicMirror/js/app.js:69:12)
        at App.start (/home/pi/MagicMirror/js/app.js:210:3)
        at Object. (/home/pi/MagicMirror/js/electron.js:115:7)
        at Module._compile (internal/modules/cjs/loader.js:786:30)
    [2020-05-20 17:25:02.511] [LOG]    Loading module helpers ...
    [2020-05-20 17:25:02.555] [LOG]    Initializing new module helper ...
    [2020-05-20 17:25:02.557] [LOG]    Module helper loaded: updatenotification
    [2020-05-20 17:25:02.558] [LOG]    No helper found for module: helloworld.
    [2020-05-20 17:25:02.559] [LOG]    All module helpers loaded.
    [2020-05-20 17:25:02.680] [LOG]    Starting server on port 8080 ... 
    [2020-05-20 17:25:02.693] [LOG]    Server started ...
    [2020-05-20 17:25:02.694] [LOG]    Connecting socket for: updatenotification
    [2020-05-20 17:25:02.695] [LOG]    Sockets connected & modules started ...
    [2020-05-20 17:25:02.785] [LOG]    Launching application.
    [2020-05-20 17:25:24.052] [LOG]    Shutting down server...
    [2020-05-20 17:25:24.053] [LOG]    Stopping module helper: updatenotifica

Log in to reply