doczjs / docz

✍ It has never been so easy to document your things!
https://docz.site
MIT License
23.62k stars 1.46k forks source link

gatsby-theme-docz incompatibility with Gatsby v3: Missing onError handler for invocation 'building-schema' #1624

Open wyqydsyq opened 3 years ago

wyqydsyq commented 3 years ago

Bug Report

Describe the bug

I have an existing Gatsby V3 project with MDX pages I wanted to use gatsby-theme-docz with for our documentation. After following the setup guide my Gatsby site fails to build.

To Reproduce

  1. Initialize Gatsby project w/ MDX support for regular content pages e.g. https://www.gatsbyjs.com/docs/mdx/getting-started/
  2. Add gatsby-theme-docz as per https://github.com/pedronauck/docz/tree/master/core/gatsby-theme-docz
  3. Run npm start or npx gatsby develop
  4. See a cryptic error and the schema get stuck while building:
    Missing onError handler for invocation 'building-schema', error was 'Error: TypeError[.excerpt]: TypeError[.excerpt.truncate]: Cannot convert to InputType the following
    value: undefined'

Expected behavior

Building schema doesn't error out or get stuck

Environment

dr3dr3 commented 3 years ago

I'm encountering the same thing. Did notice that Docz has dependency on React V16 and I am using React V17 + Gatsby V3

glassdimlygr commented 2 years ago

When will docz be updated to support react 17 and gatsby version 4? I'm probably going to switch out docz for storybook, because I'm hitting too many old library issues. I.e. I had to install gatsby-plugin-sass@3.2.0 which is a year old.