Use fetch instead of request and fix JS error

/cc @matthew-andrews @commuterjoy 

www.youtube.com/watch?v=Pubd-spHN-0