doczjs / docz

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

Webpack error when building docz in nextjs project #1557

Open testuserdecz opened 4 years ago

testuserdecz commented 4 years ago

Bug Report

i installed docz 2.3.1 after that created simple Button.mdx and run npm run docz build and i got the error. I am trying to use docz on existing next js project

" ERROR

There was an error compiling the html.js component for the development server.
WebpackError: TypeError: Cannot read property 'myConfig' of undefined ."**

This is my doczrc.js file:

export default { src: './src/', title: 'App', typescript: true }

To Reproduce

  1. install docz@2.3.1
  2. Create provided doczrc.js file
  3. Create provided Button.mdx
  4. npm run docz build
  5. See error in console

Environment

Note: it happens sometimes that it actually work, but then it stops and i have to delete packages, start everything again and its not always that after that it starts working again.