This issue occurs because the library is unable to find a global variable. You can fix it by adding the following script to your index.html, which is the root file of your application:
<script> var global = window; </script>