Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'pre' of undefined #99

Open
orafaaraujo opened this issue Apr 19, 2021 · 4 comments
Open

Cannot read property 'pre' of undefined #99

orafaaraujo opened this issue Apr 19, 2021 · 4 comments

Comments

@orafaaraujo
Copy link

mdpdf CHANGELOG.md

TypeError: Cannot read property 'pre' of undefined
    at showdownHighlight (/usr/local/lib/node_modules/mdpdf/node_modules/showdown-highlight/lib/index.js:32:23)
    at _parseExtension (/usr/local/lib/node_modules/mdpdf/node_modules/showdown/dist/showdown.js:2301:13)
    at Array.forEach (<anonymous>)
    at Object.showdown.helper.forEach (/usr/local/lib/node_modules/mdpdf/node_modules/showdown/dist/showdown.js:653:9)
    at _constructor (/usr/local/lib/node_modules/mdpdf/node_modules/showdown/dist/showdown.js:2266:23)
    at new showdown.Converter (/usr/local/lib/node_modules/mdpdf/node_modules/showdown/dist/showdown.js:2238:3)
    at parseMarkdownToHtml (/usr/local/lib/node_modules/mdpdf/src/index.js:69:21)
    at /usr/local/lib/node_modules/mdpdf/src/index.js:115:21
    at tryCatcher (/usr/local/lib/node_modules/mdpdf/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/mdpdf/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/usr/local/lib/node_modules/mdpdf/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/usr/local/lib/node_modules/mdpdf/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/usr/local/lib/node_modules/mdpdf/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/usr/local/lib/node_modules/mdpdf/node_modules/bluebird/js/release/promise.js:673:18)
    at /usr/local/lib/node_modules/mdpdf/node_modules/bluebird/js/release/nodeback.js:42:21
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:75:3)

Hi, I'm trying to use the mdpdf but I'm facing the issue above.

My versions are
node: 15.5.1
npm: 7.10.0
mdpdf: 2.1.2

Any clue what might be happening?

Thank you

@lonesomegeek
Copy link

Seems like a problem in showdown-highlight dependency.

Same problem here.

@turpoint
Copy link

Same here

@orafaaraujo
Copy link
Author

I could make it work using a fixed version:

npm install [email protected] -g

@Flou21
Copy link

Flou21 commented May 12, 2021

same, with fixed version it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants