While calling the pubnub-chat.js within my application I get the error:
Uncaught Reference Error: module is not defined
Source: module.exports = Controller;
But when upon looking into the .js file, there is nothing mentioned along these lines.
I solved it, I had to use the require function and put the .js in the lib folder.
Great! happy you were able to self resolve.