Describe the bug
The build fails with Cannot destructure propertythemeConfigof 'undefined' or 'null'.. It works fine on the local dev server.
To Reproduce
Here's the repo https://github.com/viewstools/docs/tree/docz.
Expected behavior
That the build works.
Environment
Additional context/Screenshots

Hi dude, I released a new version, please try to update now 馃檹 I tested your project on my computer and everything is working fine!
nice! it works now, thanks :)
@pedronauck I am getting the same error in 0.13.7 with the default theme:

This happens as soon as I import a component.
I am using Typescript with create-react-app in a monorepo.
Same problem as @sbaechler.
We love docz, but this prevents our frontend engineers to work :-(
Same here
I reverted to 0.12.17.
Make sure to the dependencies:
"@emotion/cache": "^10.0.0",
"@emotion/core": "^10.0.6",
"docz": "0.12.17",
"docz-theme-default": "^0.12.17",
@pedronauck is working hard on 0.14 with better parsing and stability. Let's be patient =)
We solved it by not using nested menu (name, menu in the frontmatter), but the now the overall default styles of the theme are broken.
:thinking: we are using emotion@9 still in our library there will be conflicts then right ?
Yeah pretty much don't know what's gonna crack there if you upgrade @tclain. Give a try with those versions I sent earlier.
ok, should we assume that for now 0.12.17 is the safest option then ? Anyway keep on the good work, if we can help is some way, we'd happy to !
Adding error messages in plain text so people can find this issue.
Uncaught TypeError: Cannot destructure property `colors` of 'undefined' or 'null'.
at linkStyle (index.m.js?1110:582)
at eval (index.m.js?1110:605)
at handleInterpolation (serialize.browser.esm.js?3224:131)
at serializeStyles (serialize.browser.esm.js?3224:223)
at eval (styled-base.browser.esm.js?c132:91)
at updateContextConsumer (react-dom.development.js?61bb:15065)
at beginWork (react-dom.development.js?61bb:15231)
at performUnitOfWork (react-dom.development.js?61bb:17941)
at workLoop (react-dom.development.js?61bb:17981)
at HTMLUnknownElement.callCallback (react-dom.development.js?61bb:149)
at Object.invokeGuardedCallbackDev (react-dom.development.js?61bb:199)
at invokeGuardedCallback (react-dom.development.js?61bb:256)
at replayUnitOfWork (react-dom.development.js?61bb:17228)
at renderRoot (react-dom.development.js?61bb:18100)
at performWorkOnRoot (react-dom.development.js?61bb:18958)
at performWork (react-dom.development.js?61bb:18870)
at performSyncWork (react-dom.development.js?61bb:18844)
at requestWork (react-dom.development.js?61bb:18713)
at scheduleWork (react-dom.development.js?61bb:18522)
at scheduleRootUpdate (react-dom.development.js?61bb:19190)
at updateContainerAtExpirationTime (react-dom.development.js?61bb:19218)
at updateContainer (react-dom.development.js?61bb:19275)
at ReactRoot.render (react-dom.development.js?61bb:19537)
at eval (react-dom.development.js?61bb:19677)
at unbatchedUpdates (react-dom.development.js?61bb:19073)
at legacyRenderSubtreeIntoContainer (react-dom.development.js?61bb:19673)
at Object.render (react-dom.development.js?61bb:19734)
at render (index.jsx?a7c7:14)
at Module.eval (index.jsx?a7c7:17)
at eval (index.jsx:69)
at Module../.docz/app/index.jsx (app.js:22)
at __webpack_require__ (runtime~app.js:801)
at fn (runtime~app.js:164)
at Object.0 (app.js:179)
at __webpack_require__ (runtime~app.js:801)
at checkDeferredModules (runtime~app.js:60)
at Array.webpackJsonpCallback [as push] (runtime~app.js:47)
at app.js:1
The above error occurred in the <Context.Consumer> component:
in ThemeConfig (created by MenuLink)
in div (created by Context.Consumer)
in MenuLink (created by Menu$1)
in div (created by Context.Consumer)
in Menu$1 (created by Context.Consumer)
in nav (created by Context.Consumer)
in div (created by Context.Consumer)
in div (created by Context.Consumer)
in Menu (created by SidebarBase)
in SidebarBase (created by withSizes(SidebarBase))
in withSizes(SidebarBase) (created by Context.Consumer)
in div (created by Context.Consumer)
in Main (created by Context.Consumer)
in ThemeConfig (created by Page)
in Page (created by AsyncRoute)
in AsyncRoute (created by Route)
in Route (created by Context.Consumer)
in Switch (created by Context.Consumer)
in MDXProvider (created by DocPreview)
in DocPreview (created by Context.Consumer)
in ThemeProvider (created by Context.Consumer)
in ThemeConfig (created by Theme)
in Theme (created by Theme)
in ModalProvider (created by ProviderWrapper)
in ThemeProvider (created by ProviderWrapper)
in IntlProvider (at ProviderWrapper.js:11)
in ProviderWrapper (created by Theme)
in ScrollToTopBase (created by Route)
in Route (created by withRouter(ScrollToTopBase))
in withRouter(ScrollToTopBase) (created by Theme)
in Router (created by BrowserRouter)
in BrowserRouter (created by Router)
in Router (created by Theme)
in DataServer (created by Theme)
in StateProvider (created by Theme)
in ErrorBoundary (created by Theme)
in Theme (at root.jsx:7)
in Root (created by HotExportedRoot)
in AppContainer (created by HotExportedRoot)
in HotExportedRoot (at app/index.jsx:14)
React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
@guilhermedecampo I tried your work-around but not working for me, i'm having another issue.
It's trying to import Wrapper from 'null' in the root.jsx file
I reverted to 0.12.17.
Make sure to the dependencies:
"@emotion/cache": "^10.0.0", "@emotion/core": "^10.0.6", "docz": "0.12.17", "docz-theme-default": "^0.12.17",@pedronauck is working hard on 0.14 with better parsing and stability. Let's be patient =)
Not working for React Native :(
Most helpful comment
@pedronauck I am getting the same error in 0.13.7 with the default theme:
This happens as soon as I import a component.
I am using Typescript with create-react-app in a monorepo.