Closed lengerrong closed 1 year ago
I ran into this same error when using this library in an AWS lambda function with a NodeJS environment.
Same error in pure project with node-pptx only. On Windows 10.
Hi guys. Same error too and I resolved.
/node_modules/nodejs-pptx/lib/factories/index.js:42
- if (zip.files.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(zip.files, key)) {
like https://github.com/heavysixer/node-pptx/pull/84/commits/efe21998639f2b5295f4350e860cfe0a2238a2d7
have a good day. :)
This solves the issue - can you please create a tag or new version I cannot you this package
TypeError: zip.files.hasOwnProperty is not a function at PowerPointFactory.loadFromRawFileData (node_modules/nodejs-pptx/lib/factories/index.js:42:27) at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Presentation.loadExistingPPTX (node_modules/nodejs-pptx/lib/presentation.js:99:13)
at async Composer.load (node_modules/nodejs-pptx/lib/composer.js:15:9)