Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

documentation on args is wrong #4

Open
ghost opened this issue Feb 10, 2020 · 2 comments
Open

documentation on args is wrong #4

ghost opened this issue Feb 10, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 10, 2020

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)

@asaf050
Copy link
Owner

asaf050 commented Mar 2, 2020

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

Maybe try declare args as any or string?

@sagacitysite
Copy link

sagacitysite commented Oct 21, 2020

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(' ');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants