MMM-Screencast icon indicating copy to clipboard operation
MMM-Screencast copied to clipboard

Could not validate config file

Open PKali20 opened this issue 4 years ago • 1 comments

When i go to open MagicMirror this error pops up!

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:107 var config = { ^^^ SyntaxError: Unexpected token 'var' at Module._compile (internal/modules/cjs/loader.js:896:18) at Object.Module._extensions..js (internal/modules/cjs/loader.js:986:10) at Module.load (internal/modules/cjs/loader.js:816:32) at Module._load (internal/modules/cjs/loader.js:728:14) at Function.Module._load (electron/js2c/asar.js:748:26) at Module.require (internal/modules/cjs/loader.js:853:19) at require (internal/modules/cjs/helpers.js:74:18) at loadConfig (/home/pi/MagicMirror/js/app.js:70:12) at App.start (/home/pi/MagicMirror/js/app.js:217:3) at Object. (/home/pi/MagicMirror/js/electron.js:129:7)

Here is the coding that i copied from the instructions.

var config = { modules: [ { module: "MMM-Screencast", position: "bottom_right", config: { position: "bottomRight", height: 300, width: 500, } } ]

	}

If watched multiple videos and looked at many websites but I still cant see to find the problem. If anyone is willing to help me that would be great.

PKali20 avatar Jan 07 '21 20:01 PKali20

Hey @PKali20, so you def have an issue with you config file. The main part you want to add/copy from the README is this:

{
      module: 'MMM-Screencast',
      position: 'bottom_right', // This position is for a hidden <div /> and not the screencast window
      config: {
	      position: 'bottomRight',
	      height: 300,
	      width: 500,
      }
}

And stick it at the end of the already defined config object:

var config = {
    modules: [
      // other modules will be defined here in brackets
    ]
}

If you are still stuck feel free to paste your config (with all API keys removed!!) in here and when i find time I'll see about formatting it for you. Best!

kevinatown avatar Mar 30 '21 20:03 kevinatown