asaf050/node-pandoc-promise

documentation on args is wrong

Opened this issue · 2 comments

Hi
const args = '-f html -t docx -o word.docx'; const src = '<h1>Hello</h1><p>It&rsquo;s bananas</p>'; await nodePandoc(src, args);
receive :
Uncaught Exception at:The "args" argument must be of type object. Received type string, meta: [{}]

I also try with array, same error (i'm using typeScript)

Hi
It looks like this error coming from the typescript compiler.

Maybe try declare args as any or string?

We had the same problem in node js. In our case it worked with applying split(' ') to the args string, like

const args = '-f html -t docx -o word.docx'.split(' ');