How to generate a pdf report from dashboard 2

I've been trying to make a pdf report with dashboard 2.
I've tried with node-red-contrib-pdfmake2 (node) - Node-RED, but I only get an error ("TypeError: Cannot read properties of undefined (reading 'vfs')"). I've also tried with wkhtmltopdf, but it doesn't work either.

Is there any current way to make a pdf report, possibly adding graphics or charts?

I was thinking of implementing a metabase to generate reports. Does it make sense to do that?

There are plenty of examples knocking around the forum e.g: Hide/Show elements in a pdf with node-red-contrib-pdfmake - #4 by Steve-Mcl

Thanks.
I can't try anything because node gives me an error.
TypeError: Cannot read properties of undefined (reading 'vfs').

When do you get that error (before/after a msg enters into the node)? How do you see that error? Is node-red starting up?

Also, what version of node-red and nodejs are you using?

Lastly, have you tried using the original node-red-contrib-pdfmake ?

I get the error when deploying.
I tried both pdfmake and pdfmake2.
nodejs --> v18.19.0
node-red --> v4.0.5

If you click on the node id in the debug node (the number starting 40aa) which node in your flow is selected? It is often a good idea to give nodes names so that you don't end up with node ids in debug.

the pdfmake node.

And you are saying that it does that immediately on deploy, even without you clicking the Inject button?

Yes, even without clicking on the inject.

What OS and hardware are you running on?

How do you run node-red?

In a command window, stop node red then start it again and post the full log output here. Copy/paste, not screenshot.

Also select the three nodes you show and Export them and paste the export here.

In case you don't know, in order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

See this post for more details - How to share code or flow json