docz icon indicating copy to clipboard operation
docz copied to clipboard

Cannot read property 'get' of undefined

Open Niofh opened this issue 4 years ago • 5 comments

npm run docz dev image

Niofh avatar Jul 22 '21 07:07 Niofh

Hmm, that's bad! But we'll take a look at it! Thank you for reporting

Can you just share more information @Niofh? As such which version, OS, etc. Or even maybe, a repo or a codesandbox link, with the same configuration settings you're using, just to make it reproducible from our side.

renatobenks avatar Jul 22 '21 23:07 renatobenks

I'm getting the exact same problem

My Dependencies: "react": "^17.0.2", "react-dom": "^16.8.6", "react-frame-component": "^4.1.1"

OS: Windows 10 Node version: v14.16.1 NPM version: 6.14.12

azharisubroto avatar Jul 27 '21 09:07 azharisubroto

I'm getting the exact same problem this is my github https://github.com/jiamxia/jiam-ui

songguoguo927 avatar Aug 20 '21 03:08 songguoguo927

I'm getting the exact same problem

My Dependencies: "react": "^17.0.2", "react-dom": "^17.0.2"

OS: Windows 10 Node version: v12.20.2

zhaokgithub avatar Sep 02 '21 06:09 zhaokgithub

This was a showstopper bug for me, but I managed to make Docz work nevertheless by using the gatsby theme.

There are conflicting dependencies, so installation should be as follow:

npm install --save-dev gatsby@^4.x docz@latest gatsby-theme-docz@latest @emotion/core@^10.x

Seems like the latest version of @emotion/core is causing some issues.

After that, remember to run npx gatsby develop (instead ofdocz dev), and so forth for the rest of commands

There will be some warnings in the console, ignore them:

warn Plugin gatsby-source-filesystem is not compatible with your gatsby version 4.5.4 - It requires
gatsby@^2.2.0
warn Plugin gatsby-plugin-catch-links is not compatible with your gatsby version 4.5.4 - It requires
gatsby@^2.0.0
warn Plugin gatsby-plugin-emotion is not compatible with your gatsby version 4.5.4 - It requires
gatsby@^2.0.0
warn Plugin gatsby-source-filesystem is not compatible with your gatsby version 4.5.4 - It requires
gatsby@^2.2.0
warn Plugin gatsby-plugin-catch-links is not compatible with your gatsby version 4.5.4 - It requires
gatsby@^2.0.0
warn Plugin gatsby-plugin-emotion is not compatible with your gatsby version 4.5.4 - It requires
gatsby@^2.0.0

Also, I experienced that inlining Docz config in gatsby-config.js seems to be breaking something, so instead of this:

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-theme-docz',
      options: {
        /* your custom options */
      },
    },
  ],
}

do this:

// gatsby-config.js
module.exports = {
  plugins: ['gatsby-theme-docz']
};
// doczrc.js
module.exports = {
  /* your custom options */
}

fcano-ut avatar Jan 24 '22 15:01 fcano-ut