this generally happens if either the class does not exist (js file not included in index.html) or there is an error in the class js code and the class cannot be instantiated

start the browser debugger and refresh your page and check the error. it should point you to the issue