Ninja 4.5.18 PDF generation fails with local phantomjs

Hi all,
After trying in vain to fix this on my own, I am coming to you for help. I have another one of those errors where local phantomjs fails to generate the pdf, hence invoices are not attached when the mails is sent out.
I used the test.pjs script with the url which - after a lengthy output - came up with the following:

"console": [
        {
            "message": "ReferenceError: Can't find variable: pdfMake",
            "trace": [
                " -> https://invoice.host.name/built.js?no_cache=4.5.18: 1 (in function GetPdfMake)",
                " -> https://invoice.host.name/built.js?no_cache=4.5.18: 1 (in function generatePDF)",
                " -> https://invoice.host.name/view/xb4o6x2msuljczxtuoofds8yibr1hkou?phantomjs=true: 565 (in function getPDFString)",
                " -> https://invoice.host.name/view/xb4o6x2msuljczxtuoofds8yibr1hkou?phantomjs=true: 581 (in function writePdfAsString)",
                " -> https://invoice.host.name/view/xb4o6x2msuljczxtuoofds8yibr1hkou?phantomjs=true: 592",
                " -> https://invoice.host.name/built.js?no_cache=4.5.18: 2 (in function u)",
                " -> https://invoice.host.name/built.js?no_cache=4.5.18: 2 (in function fireWith)",
                " -> https://invoice.host.name/built.js?no_cache=4.5.18: 2 (in function ready)",
                " -> https://invoice.host.name/built.js?no_cache=4.5.18: 1 (in function r)"
            ]
        }
    ]

In the laravel error log I find this:
[2020-04-18 08:20:52] production.ERROR: ReferenceError: Can't find variable: pdfMake {"context":"JavaScript","user_id":0,"account_id":0,"user_name":"","method":"GET","user_agent":"Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","locale":"de","ip":"10.0.0.142","count":1,"is_console":"no","is_api":"no","db_server":"mysql","url":"log_error"} []
Am I missing some dependency here?
Thanks a lot for any help.

Kind regards
Johannes

Have you made any changes to the codebase?