You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed fresh version and can convert even simple markdown file, because it always throws error.
md-to-pdf version: 3.0.1
platform Windows
node version: 9.11.2
Error that is thrown:
md-to-pdf.cmd .\sample.md
× generating PDF from .\sample.md
→ Cannot read property 'readFile' of undefined
{ ListrError: Something went wrong
at tasks.then (c:\Users\razjel\AppData\Roaming\npm\node_modules\md-to-pdf\node_modules\listr\index.js:102:18)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:697:11)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
name: 'ListrError',
errors:
[ TypeError: Cannot read property 'readFile' of undefined
at Object.exports.readFile (c:\Users\razjel\AppData\Roaming\npm\node_modules\md-to-pdf\dist\lib\read-file.js:13:97)
at Object.exports.convertMdToPdf (c:\Users\razjel\AppData\Roaming\npm\node_modules\md-to-pdf\dist\lib\md-to-pdf.js:17:29)
at Task.task (c:\Users\razjel\AppData\Roaming\npm\node_modules\md-to-pdf\dist\cli.js:107:39)
at Promise.resolve.then.then.skipped (c:\Users\razjel\AppData\Roaming\npm\node_modules\md-to-pdf\node_modules\listr\lib\task.js:167:30)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:697:11)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3) ],
context: {} }
The text was updated successfully, but these errors were encountered:
I thought you'd automatically get a warning if you used a lower node version than specified in the engines field, but apparently not 🤷🏻♂️ I assumed that latest Node 10.x is the minimum that people would be using, since LTS is already 12.x by now, but maybe i was too quick to use the new promise-based fs API.
I'll add a fallback to use the old readFile api instead. In the meantime I suggest to update to latest Node 10.x or 12.x
I installed fresh version and can convert even simple markdown file, because it always throws error.
Error that is thrown:
The text was updated successfully, but these errors were encountered: