I was stuck for 2 hours on this. I was using Wijmo library and was including the complete library before the open js file. I kept getting’Uncaught TypeError: Cannot call method 'formatString' of undefined’. Finally, I switched the order and put the open js file before the complete js file and the error went away.
The lesson is that undefined means you haven’t defined it yet
. Make sure it isn’t defined below it and that you didn’t forget to include it.