TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received null
See original GitHub issuehere was my command:
markdown-pdf report-paper-3.md -o $(uuidgen)
I got this error
node:internal/validators:120
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received null
at new NodeError (node:internal/errors:372:5)
at validateString (node:internal/validators:120:11)
at normalizeSpawnArguments (node:child_process:505:3)
at spawn (node:child_process:693:13)
at Object.execFile (node:child_process:327:17)
at WriteStream.<anonymous> (/Users/amills/.nvm/versions/node/v16.15.0/lib/node_modules/markdown-pdf/index.js:117:22)
at WriteStream.emit (node:events:539:35)
at finish (node:internal/streams/writable:754:10)
at finishMaybe (node:internal/streams/writable:739:9)
at afterWrite (node:internal/streams/writable:504:3) {
code: 'ERR_INVALID_ARG_TYPE'
}
the error makes no sense to me 😦 😦
Issue Analytics
- State:
- Created a year ago
- Reactions:8
- Comments:7
Top Results From Across the Web
The "path" argument must be of type string ... - Stack Overflow
I'm working on a project in React and ran into a problem that has me stumped. Whenever I run yarn start I get...
Read more >The "file" argument must be of type string. Received type object
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]: ...
Read more >[Fix] TypeError [ERR_INVALID_ARG_TYPE]: The “path ...
Have you run into the error “TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined”? In this story I'll go...
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 >the key argument must be of type string or an instance of ...
TypeError [ERRINVALIDARGTYPE]: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received null at ...
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
It worked for me after installing
phantomjs-prebuilt
and passing the path to thephantomjs.exe
as the--phantom-path
parameter.Example:
I had to supply both: