Closed glowkeeper closed 4 years ago
I get the same warning, but I do get an output PDF file that looks just fine. Have you tried viewing the console in Atom (View -> Developer -> Toggle Developer Tools and then select the Console tab) to see what the actual reason is why it is giving you this warning?
For me, it tured out that creating a default style file ~/.atom/styles.less gets rid of the warning.
Hey, this could have been for the reason that this commentor mentioned (styles.less), which should be fixed now. Otherwise we would need more context from the error message
I ran into this issue too. The output looks fine but the warning appeared. I already have the ~/.atom/styles.less
file.
I have Atom 1.56.0 and markdown-pdf 2.3.3.
The console shows:
convert.js? [sm]:85
TypeError: Cannot read property 'pre' of undefined
at showdownHighlight (/Users/saiwingy/.atom/packages/markdown-pdf/node_modules/showdown-highlight/lib/index.js:32)
at _parseExtension (converter.js:121)
at Array.forEach (<anonymous>)
at Object.showdown.helper.forEach (helpers.js:77)
at _constructor (converter.js:86)
at new showdown.Converter (converter.js:58)
at parseMarkdownToHtml (/Users/saiwingy/.atom/packages/markdown-pdf/node_modules/mdpdf/src/index.js:69)
at /Users/saiwingy/.atom/packages/markdown-pdf/node_modules/mdpdf/src/index.js:115
at tryCatcher (/Users/saiwingy/.atom/packages/markdown-pdf/node_modules/bluebird/js/release/util.js:16)
at Promise._settlePromiseFromHandler (/Users/saiwingy/.atom/packages/markdown-pdf/node_modules/bluebird/js/release/promise.js:547)
at Promise._settlePromise (/Users/saiwingy/.atom/packages/markdown-pdf/node_modules/bluebird/js/release/promise.js:604)
at Promise._settlePromise0 (/Users/saiwingy/.atom/packages/markdown-pdf/node_modules/bluebird/js/release/promise.js:649)
at Promise._settlePromises (/Users/saiwingy/.atom/packages/markdown-pdf/node_modules/bluebird/js/release/promise.js:729)
at Promise._fulfill (/Users/saiwingy/.atom/packages/markdown-pdf/node_modules/bluebird/js/release/promise.js:673)
at /Users/saiwingy/.atom/packages/markdown-pdf/node_modules/bluebird/js/release/nodeback.js:42
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61)
markdwon-pdf
works beautifully on two machines (one running atrom on Mac OSX and the other Lubuntu), where methods.md is turned into a great looking pdf. Thanks! However, when attempting to convert methods.md on a third machine (running Ubuntu), the output contains nothing but Attempting conversion with fallback. Er, help!