Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pptx.stream(): Uncaught TypeError: Cannot read property 'compression' of undefined #932

Closed
arbourd opened this issue Apr 7, 2021 · 1 comment
Assignees
Milestone

Comments

@arbourd
Copy link

arbourd commented Apr 7, 2021

With 3.5.0, this sample code no longer works. It looks like the examples haven't been updated if the options with compression key are now required for stream() like they look to be for writeFile():

pptx.stream()
  .then((data) => {
    console.log(data);
  });

In a Fiddle (open the console/inspector):
https://jsfiddle.net/hztm8p6k/1/

Solution is to provide compression option:

pptx.stream({compression: false})
  .then((data) => {
    console.log(data);
  });

Is this supposed to be required?

@gitbrent gitbrent changed the title Uncaught TypeError: Cannot read property 'compression' of undefined pptx.stream(): Uncaught TypeError: Cannot read property 'compression' of undefined Apr 12, 2021
@gitbrent gitbrent self-assigned this Apr 12, 2021
@gitbrent gitbrent added this to the 3.5.1 milestone Apr 12, 2021
gitbrent added a commit that referenced this issue Apr 12, 2021
gitbrent added a commit that referenced this issue Apr 12, 2021
@gitbrent gitbrent modified the milestones: 3.5.1, 3.6.0 Apr 12, 2021
@gitbrent
Copy link
Owner

Thanks for reporting this @arbourd

The addition of WriteBaseProps to the stream() method was not implemented correctly and caused this issue. Apparently the node stream test was skipped or the feedback not checked as well, so apologies for the poor Q&A.

The issue has been fixed and the type defs file updated as well.

As v3.6.0 has major demo changes, I dont want to create a v3.5.1 release with the current codebase. However, we are moving to monthly releases starting this cycle, so a fix will be shipped soon. If you'd like to patch your current install, you can check the 2 changes above.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants