Command cli: '"file" argument must be a non-empty string'
See original GitHub issueHi:
When I run markdown-pdf -o test.pdf test.md
Give me this error:
(node:7924) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 2 end listeners added. Use emitter.setMaxListeners() to increase limit
child_process.js:383
throw new TypeError('"file" argument must be a non-empty string');
^
TypeError: "file" argument must be a non-empty string
at normalizeSpawnArguments (child_process.js:383:11)
at exports.spawn (child_process.js:496:38)
at Object.exports.execFile (child_process.js:212:15)
at WriteStream.<anonymous> (/usr/lib/node_modules/markdown-pdf/index.js:117:22)
at emitNone (events.js:111:20)
at WriteStream.emit (events.js:208:7)
at finishMaybe (_stream_writable.js:614:14)
at afterWrite (_stream_writable.js:465:3)
at onwrite (_stream_writable.js:455:7)
at fs.write (fs.js:2192:5)
I tried the inverse form: markdown-pdf -o test.md test.pdf
but:
events.js:183
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open 'prueba.pdf'
Thanks for advanced.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
Getting "TypeError: file argument must be a non-empty string ...
I'm sure I am missing something, but this one feels like it's a bug within the Cordova Build extension. FYI Node: 8.9.1, NPM:...
Read more >Empty string breaks command line - Unix Stack Exchange
The ls utility does not like an empty argument because there is no file or directory that has an empty name. – Kusalananda...
Read more >xargs - Construct an argument list and run a command - IBM
The placeholder following the -I is a string that can appear multiple times in the command template. xargs strips the input line of...
Read more >argparse — Parser for command-line options, arguments and ...
All it does is convert empty strings to False and non-empty strings to True . This is usually not what is desired. In...
Read more >picocli - a mighty tiny command line interface
The file may itself contain additional @-file arguments; any such arguments will be processed recursively. If the file does not exist, or cannot ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With node v8.16.0, i got the same issue. I guess it’s related to https://github.com/nodejs/node/issues/19235
It happens if
opts.phantomPath
is undefined. I runnednpm install -g phantomjs-prebuild
and used the--phantom-path
parameter and it fixed the issue.Just a correction, the package name I found was
phantomjs-prebuilt
making the linenpm install -g phantomjs-prebuilt