Read the statement by Michael Teeuw here.
how do i update my magic mirror
-
@bjjsoul U cannot just paste the code in. I am trying to teach you how to solve the problems.
All {} and [] must be matched in order
-
thank bro for your time, but i am copying and paste in the last line in the config file, but i dont know whats is my error
in this moment its looks like this:{ module: "MMM-Voice-Commands", config: { debug: false, //Displays end results and errors from annyang in the Log autoStart: true, //Adds annyang commands when it first starts activateCommand: "hello mirror", //Command to active all other commands deactivateCommand: "goodbye mirror", //Command to deactivate all other commands alertHeard: false, //Whether an alert should be shown when annyang hears a phrase (mostly for debug) commands: { "command statement :variable (optional statement)": "SOCKET_NOTIFICATION_NAME", //The payload of the socket notification will be whatever is said in the :variable "command statement *variable": function(param){ alert("Whatever is said in the *variable space is given as the "+param); //These function's 'this' are bound to the module's 'this' so you can do stuff like: this.sendNotification("PAGE_SELECT", "2"); } } }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}
-
now is this faaak :(
Starting MagicMirror: v2.8.0
Loading config …
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:121
if (typeof module !== “undefined”) {module.exports = config;}
^^SyntaxError: Unexpected token if
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile (internal/modules/cjs/loader.js:678:28)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:722:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
at Function.Module._load (internal/modules/cjs/loader.js:551:3)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:20:18)i dont know how find the line 121
i am very noob in this -
@bjjsoul, can you copy/past in here your entire config.js?
also when posting the code please click on the “</>” button to put in the code block.that way the code will be in a box like this one.
-
@bjjsoul said in how do i update my magic mirror:
but i am copying and paste in the last line in the config file
come on man… you are missing a close brace } and a close bracket ]
start at the top of the new module you are adding and find the open braces { and match then with a close brace }
and then make sure that the confg.js modules section starts with a [ and ends with a ]