question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The "file" argument must be of type string. Received type object

See original GitHub issue

Hi,

When I run markdown-pdf README.md I get the following error:

    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
    at validateString (internal/validators.js:125:11)
    at normalizeSpawnArguments (child_process.js:414:3)
    at spawn (child_process.js:553:16)
    at Object.execFile (child_process.js:224:15)
    at WriteStream.<anonymous> (/usr/local/lib/node_modules/markdown-pdf/index.js:117:22)
    at WriteStream.emit (events.js:202:15)
    at finishMaybe (_stream_writable.js:646:14)
    at stream._final (_stream_writable.js:624:5)
    at WriteStream._final (internal/fs/streams.js:270:3)
    at callFinal (_stream_writable.js:617:10)

Can anyone suggest any solution?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:48
  • Comments:21

github_iconTop GitHub Comments

47reactions
y2k2mtcommented, Mar 13, 2019

I get the same with node 11.11.0. Reinstall without --ignore-scripts option and worked fine.

26reactions
WuglyakBolgoinkcommented, Jul 17, 2019

better to do:

sudo npm uninstall -g markdown-pdf
sudo npm install -g markdown-pdf --unsafe-perm
Read more comments on GitHub >

github_iconTop Results From Across the Web

The "file" argument must be of type string. Received type ...
Trying to deploy my React app with gh-pages but got this error message : The "file" argument must be of type string. Received...
Read more >
typeerror [err_invalid_arg_type]: the "file" argument must be of ...
The error message means that a method of the path module (like path.join ) expects one of its arguments to be a string...
Read more >
The "path" argument must be of type string. Received - YouTube
JavaScript : TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined raised when starting ...
Read more >
Pipelines fail randomly with ##[error]TypeError ...
Pipelines fail randomly with ##[error]TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined.
Read more >
The "path" argument must be of type string. Received type object
When I try to run radzen project inside radzen application I get this error:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found