TypeError: zip.files.hasOwnProperty is not a function
TypeError: zip.files.hasOwnProperty is not a function
at PowerPointFactory.loadFromRawFileData (node_modules/nodejs-pptx/lib/factories/index.js:42:27)
at runMicrotasks (
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