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

docz dev is failing #1637

Closed mano3493 closed 2 years ago

mano3493 commented 3 years ago

Hi,

docz dev is failing with below error, Can you please check this ?

ERROR

Panicking because nodes appear to be being changed every time we run queries. This would cause the site to recompile infinitely. Check custom resolvers to see if they are unconditionally creating or mutating nodes on every query. This may happen if they create nodes with a field that is different every time, such as a timestamp or unique id.

Screenshot 2021-06-14 at 12 31 51 PM
jedychen commented 3 years ago

I have the same issue, when running Docz on a React Native repo (MacOS).

jedychen commented 3 years ago

Just an update on my case, I have Docz integrated with a React Native project.

There are two solutions that fixed this issue for me:

  1. Deleted the "ios/Pods/" folder and run yarn docz:dev, this is more like a workaround
  2. In ROOT/doczrc.js, use the option src to only include the folders you store .mdx files, so that Gatsby won't watch other folders like "ios/Pods" My doczrc.js looks like this:
    export default {
    typescript: true,
    src: './app/',
    files: '**/*.mdx'
    }
renatobenks commented 2 years ago

I'll be closing this one as we're going to wanna get it solved in a single issue (https://github.com/doczjs/docz/issues/1654), as referred above. If it's happening also in a web environment (or non-react-native projects), please, open a new issue.