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

fix(gatsby-plugin-mdx): Img w/ lessBabel option in src/pages not working #31210

Merged
merged 1 commit into from May 4, 2021

Conversation

LekoArts
Copy link
Contributor

@LekoArts LekoArts commented May 4, 2021

Description

While working on my own site I noticed a bug:

  • Use gatsby-remark-images with gatsby-plugin-mdx
  • use lessBabel: true option
  • src/pages/art/index.mdx
  • That MDX file uses an image in the same directory:
Some text blabla

![Alt text](./link-to-image.jpg)

When running gatsby develop the process failed on TypeError: getNode is not a function on this line:

const parentNode = getNode(markdownNode.parent)

All the helper functions including getNode were undefined.

I don't understand why they are not all passed down anyways but for now I only added getNode

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 4, 2021
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 4, 2021
@LekoArts LekoArts merged commit b2ae4da into master May 4, 2021
@LekoArts LekoArts deleted the fix-mdx-remark-images-bug branch May 4, 2021 09:00
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

Successfully merging this pull request may close these issues.

None yet

2 participants