> Uncaught TypeError: Cannot read property 'hardwareConcurrency' of MMM-TomTomTrafficIncidents
undefined
at maps-web.min.js:1
at n (maps-web.min.js:1)
at n (maps-web.min.js:1)
at Object. (maps-web.min.js:1)
at r (maps-web.min.js:1)
at Object. (maps-web.min.js:1)
at r (maps-web.min.js:1)
at Object. (maps-web.min.js:1)
at r (maps-web.min.js:1)
at maps-web.min.js:1
MMM-TomTomTrafficIncidents.js:69 Uncaught ReferenceError: tt is not defined
at HTMLScriptElement.script.onload (MMM-TomTomTrafficIn.......
and
Source map error: Error: request failed with status 404
Resource URL: hxxp://192.xxx.x.xxx:8080/modules/MMM-TomTomTrafficIncidents/tomtom-international-web-sdk-maps/maps-web.min.js
Source Map URL: maps-web.min.js.map
The module’s creator tried my API key and it gave him this error:
A lot of different errors here.
I’ve just checked this API request with your key and it works, so check for any typos, etc.
First error is probably caused by the second one.
404 means that the source map is not hosted with the app. You can download it and put it in the proper folder.
I wrote this module. Better to discuss here to fix this issue, instead on the Github repo. I checkd out a complete new MagicMirror on my Raspberry Pi 4. And my version works.
I start to think that there is some little typo as well.
Let’s begin with some basic settings.
1/ Are you 100% sure when you start the Magic Mirror, no errors or warnings appears about a incorrect config file?
2/ Are other modules loaded correctly?
This config is a copy and paste from my MM. Except I changed the location to a random place for privacy reasons.
All the source needed is downloaded when you install the module. You have the option to set the option remoteTTCSSJS: true in the config. Then all the needed data will be requsted from the TomTom server.
[2020-08-25 23:58:20.461] [INFO] Checking file… /home/pi/MagicMirror/config /config.js
[2020-08-25 23:58:20.753] [LOG] Line 1 col 1 Definition for rule ‘prettier/pr ettier’ was not found.
/home/pi/MagicMirror/js/check_config.js:66
throw new Error(“Wrong syntax in config file!”);
^
Error: Wrong syntax in config file!
at /home/pi/MagicMirror/js/check_config.js:66:10
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_conte xt.js:53:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! magicmirror@2.12.0 config:check: node js/check_config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the magicmirror@2.12.0 config:check script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-08-25T22_58_20_797Z-debug.log
I see that you use sudo to obtain root rights. Perhaps you’ve installed more things under root? Because that would explain that some files can’t be found due user rights.
I see an extra a slash in the reference to the MMM-TomTomTrafficIncidents.js. // instead of / And the module name is there twice. MM is looking for the scripts in a non existing folder. I think that that might be the reason the script was unable to load all scripts and other files. When you set the parameter to load the TomTom scripts from the internet works. MM didn’t start looking in the non existing folder but on the URL instead.
Remove the whole module and try make a new git clone in the directory modules. git clone https://github.com/Travelbacon/MMM-TomTomTrafficIncidents ./
in /home/pi/MagicMirror/modules
About your key. Consider to generate a new one. It is known to the public.
I tested your key with a fresh clone of MM. And it works. There is a small installation error.
We should continue on the MagicMirror forum. The API of TomTom is working fine.