Using SheetJS with PptxGenJS gives "Uncaught TypeError: zip.generateAsync is not a function"
Hi Brent,
First Thank you for this PptxGebJS Library, really very helpfull
Yesterday I have added in the same page to download excel also, for that I have included (xlsx.core.min.js and xls.core.min.js) library files. https://github.com/SheetJS/js-xlsx
After that pptx download trowing zip.generateAsync is not a function error. Could you please guide to fix this issue.
maybe silly question,
regards Jenkins NS
Hi @jenkinsns,
It sounds like SheetJS may have clobbered JSZip.
What's the version?

Yes I am using 3.1.1 JSZip version
I have changed to 3.1.5 JSZip version, still the same error. SheetJS is working by PptxGenJS gives "Uncaught TypeError: zip.generateAsync is not a function"
I can't really help with something like your setup here... The zip method is being clobbered or lost somewhere along the line, so you may have to add some debugging/console output to watch the process and see where it falls apart.
Sure, Thank you
@jenkinsns did you find any solution??
I'm having the same issue.
As a similar JSZip Issue says, the PptxGenJS library is being clobbered by another library (or isn't included in your scripts).
- Make sure you load
pptxgenjs.jslast in your<script>block. - Make sure you are either using the pptxgenjs.bundle.js file or that you've included
jszip.js

Check JSZip
Open the console after the page is fully loaded and ensure that JSZip 3.0 is loaded. Version 3.0 added the generateAsync() method.

Lastly, try using the demo: examples/pptxgenjs-demo.html