Unhandled promise rejection TypeError: null is not a function
I am using pdfmake with Angular application to generate pdf with table, which is working fine. Generated pdf is also the correct one. But I see this error in log

Not sure why see this error.
Attach runnable example for reproduce issue.
`const documentDefinition = {
content: [
{
table: {
widths: [100, '*', 200, '*'],
body: [
['width=100', 'star-sized', 'width=200', 'star-sized'],
[
'fixed-width cells have exactly the specified width',
{ text: 'nothing interesting here', italics: true, color: 'gray' },
{ text: 'nothing interesting here', italics: true, color: 'gray' },
{ text: 'nothing interesting here', italics: true, color: 'gray' },
],
],
},
},
],
pageSize: 'A4',
pageOrientation: 'landscape',
pageMargins: [20, 30, 20, 30],
};
pdfMake.createPdf(documentDefinition).download(`myPDF.pdf`);`
This code works on playground correctly.
I am using
+-- [email protected] | +-- @foliojs-fork/[email protected] | +-- @foliojs-fork/[email protected] | +-- [email protected] | -- [email protected]
with "@angular/cli": "^8.3.29" and node version v12.20.0
Runnable example was requested above.
Hi @liborm85, thank you for your early replies. I have created same environment and added the snippet here. Please refer: https://github.com/GauravNagpure/pdfmake-issue
Hi @liborm85, did you find the solution to the issue?
Error is thrown on line with use arguments variable, but this is standard javascript variable (it is not related with pdfmake).
@liborm85 when I use download function on document object provided by createPdf method then only I get this error, can you please elaborate on how I can solve this error.
I have no idea how to solve it, because problem is in angular probably does not support arguments variable.
Facing the same issue. I am using Angular 4. When tried creating PDF, it gave me error as mentioned by @GauravNagpure .
@liborm85 Need a fix for this

I have solved the problem by exchanging the Pdfmake to Version 1.xx