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.

Issue when using Gatsby and MDX

See original GitHub issue

Production build failed when using GatsbyJS and MDX

Hello guys, thanks for this awesome library, currently I’m trying to use @arwes with gatsby and MDX plugin, the project runs in debug mode successfully, but when I add mdx file and try to build in production mode I will get this error, It tells that the problem is related to Animator.component.js but I couldn’t find the actual cause of the problem

To reproduce

Steps to reproduce the behavior:

  1. run ‘npm run build’

Additional context

 ERROR 

Page data from page-data.json for the failed page "/educations/kharazmi-en/": {
  "componentChunkName": "component---src-pages-mdx-slug-jsx",
  "path": "/educations/kharazmi-en/",
  "result": {
    "pageContext": {
      "id": "71aaed88-e6ec-5433-bc88-cad47e4d2d54",
      "slug": "educations/kharazmi.en",
      "__params": {
        "slug": "educations"
      }
    }
  },
  "staticQueryHashes": []
}

failed Building static HTML for pages - 0.584s

 ERROR #95313 

Building static HTML failed for path "/educations/kharazmi-en/"

See our docs page for more info on this error: https://gatsby.dev/debug-html


  36 |     enter: 100,
  37 |     exit: 100,
> 38 |     stagger: 25,
     | ^
  39 |     delay: 0,
  40 |     offset: 0
  41 | });


  WebpackError: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&a
  rgs[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
  
  - Animator.component.js:38 
    [koliber]/[@arwes]/animation/lib/Animator/Animator.component.js:38:1
  
  - Animator.component.js:34 
    [koliber]/[@arwes]/animation/lib/Animator/Animator.component.js:34:1
  
  - Animator.component.js:45 
    [koliber]/[@arwes]/animation/lib/Animator/Animator.component.js:45:1
  
  - static-entry.js:299 
    koliber/.cache/static-entry.js:299:22
  
  - Animator.component.js:151 
    [koliber]/[@arwes]/animation/lib/Animator/Animator.component.js:151:1
  

not finished Caching HTML renderer compilation - 0.666s

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ckolibercommented, Sep 29, 2021

Oops, I’ve forgot to remove unused file {mdx.slug}.jsx, that causes this problem, By removing this file problem solved, Thank you @romelperez The site is now available at this

0reactions
ckolibercommented, Sep 29, 2021

You are right, the problem is about incorrect type, but the error message Is related to Rendering of MDX file content/educations/kharazmi-en/ when I remove all the MDX files and related Content components the project will build successfully, do you have any example with Gatsby, MDX and Arwes ? I think I can compare those projects and It can help me to find the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

gatsby-plugin-mdx
gatsby -plugin-mdx requires gatsby-source-filesystem to be present and configured to process local MDX files in order to generate the resulting Gatsby nodes ( ......
Read more >
MDXRenderer is not working · Discussion #34714 - GitHub
I'm beginner with gatsby. I want to display mdx's body with MDXRenderer. In the page using MDXRenderer , this error occured. Not using...
Read more >
How to Build a Developer Blog with Gatsby and MDX - SitePoint
Want to build your own developer blog? Learn how to make your content shine with this extensive guide on setting up a Gatsby...
Read more >
MDX 2 Breaking changes and gatsby-plugin-mdx v4 (Content)
Both MDX 2 and v4 of the plugin are major releases and inline with semantic versioning guidelines, breaking changes are to be expected....
Read more >
Images getting wrapped in extra div when using combination ...
Before upgrading to use the latest versions of gatsby-plugin-mdx and ... Note: This is not the same as the issue with images getting...
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