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

v1.4.8 function EarmarkParser.as_ast/2 is undefined (module EarmarkParser is not available) #375

Closed
samm81 opened this issue Jul 1, 2020 · 8 comments

Comments

@samm81
Copy link

samm81 commented Jul 1, 2020

I'm getting a rather strange error. I upgraded :earmark from v1.4.5 ⇒ v1.4.8 , and am now getting an error with Earmark.as_html!/2 only in a release. It works fine with mix phx.server, but in the release I get this error:

    ** (UndefinedFunctionError) function EarmarkParser.as_ast/2 is undefined (module EarmarkParser is not available)
        EarmarkParser.as_ast("some mardown", [breaks: false, code_class_prefix: nil, do_smartypants: nil, file: "<no file>", footnote_offset: 1, footnotes: false, gfm: true, gfm_tables: false, line: 1, mapper: &Earmark.pmap/2, mapper_with_timeout: &Earmark.pmap/3, messages: [], pedantic: false, pure_links: true, renderer: Earmark.HtmlRenderer, smartypants: true, timeout: nil])
        (earmark 1.4.8) lib/earmark.ex:423: Earmark.as_html/2
        (earmark 1.4.8) lib/earmark.ex:460: Earmark.as_html!/2
        (my_app 0.1.0) lib/my_app_web/views/my_view.ex:117: MyAppWeb.MyView.markdown_to_html/1

I'm kinda flummoxed. I'll look into it more, but wanted to post this here first.

@RobertDober
Copy link
Collaborator

RobertDober commented Jul 2, 2020

😨 thank you for reporting this.

I cannot reproduce your error, can you give me more details please, what do you mean by Release, sorry I am not an expert in deployment.

@RobertDober
Copy link
Collaborator

I have a hunch though, seems I forgot to put EarmarkParser into applications (needs to be test covered).

Would be great if you could test (or tell me how to test, I'll gladly do my work 😉 ) with the current master from github, I could do a release any time

@juulSme
Copy link

juulSme commented Jul 2, 2020

I have the same issue with 1.4.8 and I can confirm that adding :earmark_parser to extra applications in mix.exs fixes the issue.

@RobertDober
Copy link
Collaborator

Thx a lot @juulSme hotfix release's coming up

@juulSme
Copy link

juulSme commented Jul 2, 2020

np, keep up the good work!

@RobertDober
Copy link
Collaborator

very kind of you but I lack so much knowledge thankfully the community is very helpful

@samm81
Copy link
Author

samm81 commented Jul 2, 2020

wow, thanks for figuring this out and patching it up so fast 👍 !

@RobertDober
Copy link
Collaborator

RobertDober commented Jul 3, 2020

wow, thanks for figuring this out and patching it up so fast !

Ty but all credit goes to @eksperimental and @juulSme
Although @eksperimental helps often this time it was @wojtekmach

Your's sincerly confused!!!!

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

No branches or pull requests

3 participants