question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Subject of the issue

Running into an issue with parser being undefined when using remark-parse. Traced the issue down to this dependency. Looks to have been introduced with the latest version of Micromark. After installing remark-parse@8.0.3 which limits mdast-util-from-markdown to semver ^0.7.0 it resolved my issue, so stopped pursuing. Leaving this here for triage, hopefully its useful!

https://github.com/syntax-tree/mdast-util-from-markdown/commit/24ec72a59505e83796301eb81993a544746a1c63

Your environment

  • OS: M1 Mac Mini 11.0.1
  • Packages: unified remark-parse
  • Env: node v15.2.1

Steps to reproduce

Install any unified plugin which depends upon mdast-util-from-markdown 0.8.4 and the latest version of micromark.

Expected behavior

Should parse the source successfully.

Actual behavior

Instead there is an error saying parse is not a function.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jondashkylecommented, Dec 9, 2020

@wooorm That resolved it! Huge thanks; this was a strange one.

@ChristianMurphy Totally. Not worth the trouble of expanding testing around this sort of issue since it was isolated to WebPack, and like you said, “when to say when” is a question with this type of thing.

Glad to know I wasn’t going crazy with this one! I encountered the problem after a decently sized refactor of my codebase, and was positive it was related to my own sloppiness for a couple hours 😂

1reaction
ChristianMurphycommented, Dec 9, 2020

Have you tried to reproduce outside of the testing? Possible test coverage doesn’t catch this one.

Coverage does not catch this.

The issue determined based off the reports in remarkjs/react-markdown#518 was improper handling of ESM/MJS by WebPack 4 with specific configs. Testing all possible build tools, with all possible configs is not feasible. There may be a happy middle, testing with some common build tool configs, but that brings up the thorny question of “what is a common build config?”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parser that can parse any broken and invalid XML. - GitHub
Broken XML is a parser that can parse any broken and invalid XML. This parser should not be used by any normal human...
Read more >
An Artisan Guide to Building Broken C Parsers - Blog
In this article, I will present many examples of incorrect assumptions you can use to waste countless hours of your life building broken...
Read more >
codecparsers: h265: Broken code in parser is duplicated and ...
We should fix the parser code and stop duplicating code in the H265 decoder. This code was copied from gstreamer-vaapi, which was doing...
Read more >
Solved: "Something broke the parser" - error publishing!
Hello! I am experiencing an "Error converting XLSForm" issue. Error contains the language: ODK Validate Error "Something broke the parser" when ...
Read more >
Html Parser - How to scan HTML files for missing assets and ...
The article presents a simple, open-source tool that I'm using to statically analyze HTML files for missing assets and broken links, before ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found