saveAs is not defined when using JSzip
There is a comment in their example:
// see FileSaver.js
You need that module if you want to use saveAs()
Here it is: https://github.com/eligrey/FileSaver.js
It works after adding the following script tag in the HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.8/FileSaver.js"></script>