-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
gatsby-theme-docz v2 build broken #985
Comments
I'm getting similar issues in Header too. Line 11 destructuring
|
I'm getting similar issues...so sad |
Using component shadowing, this can be overcome with something along the lines of
I also had to correct NavLink and SideBar due to a React ref error with React Fragment (thus the reason above for returning an array, same in the Sidebar component). Haven't had a chance yet to investigate further, but this is a quick fix. |
I solve this problem by alias of webpack.
|
Our build is failing as well:
Develop mode works fine, just trying to get a static build generated. I've tried the work around using an alias mentioned above but that isn't working. |
I need share the custom theme by npm, so I copied the theme of 'gatsby-theme-docz', added docz-proxy.js to the src doc and modified the alias of the gatsby-config.js. It can work. |
I have a successful build by shadowing the components. Basically replacing Checking console, it seems to load |
@kaxium Gastby doesn't seem to work for me. I end up with new errors: However I was able to use the work around by creating shadow components suggested by @pigmanbear for Header and NavLink by copy/pasting the components from source and adding empty objects where destructuring is failing (for example changing
|
@kaxium I got your solution working (I had the |
Should be fixed by #1023 |
Get that bad boy merged yo! |
* fix(gatsby-theme-docz): add missing source sans pro font (doczjs#991) * fix(gatsby-theme-docz): replace fragment tag to the short syntax (doczjs#992) * fix(docz-example-basic): add explicit dependency to scheduler * fix(docz): make scheduler dependency explicit * docs(docz-example-basic): add instructions to quickly run the example * fix(docz-example-typescript): add scheduler dep and docs doczjs#1020 * fix(docz-example-typescript): add scheduler dep and docs * fix(docz-example-flow): add @babel/preset-flow with onCreateBabelConfig * docs(docz-example-flow): add setup instructions * Fix flow example, add setup doc (doczjs#1021) * fix(docz-example-basic): add explicit dependency to scheduler * fix(docz): make scheduler dependency explicit * docs(docz-example-basic): add instructions to quickly run the example * fix(docz-example-typescript): add scheduler dep and docs * fix(docz-example-flow): add @babel/preset-flow with onCreateBabelConfig * docs(docz-example-flow): add setup instructions * Update Gatsby example (doczjs#1022) * fix(docz-example-basic): add explicit dependency to scheduler * fix(docz): make scheduler dependency explicit * docs(docz-example-basic): add instructions to quickly run the example * fix(docz-example-typescript): add scheduler dep and docs * fix(docz-example-flow): add @babel/preset-flow with onCreateBabelConfig * docs(docz-example-flow): add setup instructions * fix(docz-example-gatsby): make gatsby example runnable outside repo * docs(docz-example-gatsby): add setup instructions * fix(docz): remove window check from useCurrentDoc fixes doczjs#985 (doczjs#1023) * feat(docz-core): setup jest and add first test * test(docz): add tests for states.config and states.entries * ci(docz): add circleci tests (doczjs#1027) * fix(gatsby-theme-docz): fix minor linting issue * feat(docz): add circleci * chore(docz): add bootstrap to ci * ci(docz): clear cache * ci(docz): add build step to install * ci(docz): build only * ci(docz-core): try without build * ci(docz-core): remove __tests__ from include * ci(docz-core): add build * ci(docz-core): back to packages * fix(docz-example-typescript): add externally usable tsconfig * fix(docz-example-typescript): add extension of tsx file in mdx * docs(docz): add link to v1 * docs(docz): add create-docz-app to examples * fix(docz-example-flow): add scheduler dep * fix(docz-example-styled-components): add scheduler and remove caaf * docs(docz-example-react-native): add scheduler temp * docs(docz-example-images): add scheduler temp * fix(docz-core): wait for app to be ready before opening the browser * fix(docz-core): extend base config instead of overwriting user config (doczjs#1028) * chore(docz-core): typo * chore(docz): bump version to 2.0.0-rc.2 * test(docz): loosen up test temporarily * chore(docz-core): prefix scripts with yarn * chore(docz): add release:next script * chore(docz): lerna version fix * v2.0.0-rc.2 * chore(docz): bump to 2.0.0-rc.3 * 2.0.0-rc.4 * 2.0.0-rc.5
Bug Report
The build fails when running
gatsby build
on a gatsby site using thegatsby-theme-docz
theme. Additionally several dependencies require manual installation.gatsby-theme-docz/src/components/Header/index.js
The
useCurrentDoc()
hook in docz-core returns null if window does not exist.The window will not be defined when running
gatsby build
and so it fails.gatsby-theme-docz/src/components/NavLink/index.js
Same problem with
useCurrentDoc()
hookAnd then there are several problems with theme styles like:
which results in
The text was updated successfully, but these errors were encountered: