Question: referenceerror require is not defined in js?
Answer: By default require() is not a valid function in client side javascript. I recommend you look into require. js as this does extend the client side to provide you with that function. require is part of the Asynchronous Module Definition (AMD) API.