I suspect the quotation marks not only to be in a different font but to be different signs. This is indeed an issue since javascript defines strings by double (") and single quotes (') only (for reference see: https://www.w3schools.com/jsref/jsref_obj_string.asp).
So, just to be sure: After removing unnecessary properties you have a config.js that looks something like this minimal example
var config = {
port: 8080,
[...]
modules: [
{
module: "alert",
},
{
module: "updatenotification",
position: "top_bar"
},
[...]
{
module: 'MMM-Traffic',
position: 'top_left',
config: {
api_key: 'your_apikey_here',
origin: '4 Pennsylvania Plaza, New York, NY 10001',
destination: '1 MetLife Stadium Dr, East Rutherford, NJ 07073'
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}
with some content from the default config.js at the “[…]” places, your API-key instead of " ‘your_apikey_here’ " and possibly some lines commented out by prepending “//”, correct?
The fact that the MM2 starts without error message about config.js indicates, that the issue is within the properties you set, i.e. the origin/destination or the API key.
Some suggestions:
- Did you try to run it with default properties of the MMM-Traffic module (the ones I copied above)? Of course you have to input your own API key.
- Did you check whether your API key is valid?
2.a Is your API key configured correctly? As far as I know you have to login into google account and there assign the key to a project and get the access restrictions right.
2.b In case you didn’t copy the key: have you checked for typos?
If you use default config.js parameters and example parameters from MMM-Traffic module it should run. From there, you can incrementally add your changes and figure out, which property leads to the issue.