docz icon indicating copy to clipboard operation
docz copied to clipboard

2.0.0-rc.1 - Docz build fails

Open djfumberger opened this issue 7 years ago • 5 comments

Bug Report

Docz build command fails

When running docz build with latest version of docz it fails.

This is just with a very single index.mdx that contains:

---
name: Overview
---

# Overview

Hello

Here's the output:

Daves-MacBook-Pro:docs2 djfumberger$ yarn docz build
yarn run v1.17.3
warning package.json: No license field
$ /Users/djfumberger/Projects/docs2/node_modules/.bin/docz build
warning package.json: No license field
warning ../package.json: No license field
$ gatsby build
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success open and validate gatsby-configs - 0.637 s
success load plugins - 0.330 s
success onPreInit - 0.012 s
success delete html and css files from previous builds - 0.020 s
success initialize cache - 0.016 s
success copy gatsby files - 0.056 s
success onPreBootstrap - 0.037 s
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
warn The gatsby-plugin-mdx plugin has generated no Gatsby nodes. Do you need it?
success source and transform nodes - 0.108 s
success Add explicit types - 0.017 s
success Add inferred types - 0.102 s
success Processing types - 0.045 s
success building schema - 0.220 s
success createPages - 0.154 s
success createPagesStatefully - 0.034 s
success onPreExtractQueries - 0.012 s
success update schema - 0.045 s
success extract queries from components - 0.097 s
success write out requires - 0.017 s
success write out redirect data - 0.013 s
success onPostBootstrap - 0.013 s
⠀
info bootstrap finished - 4.569 s
⠀
success run static queries - 0.021 s — 1/1 150.78 queries/second
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success Building production JavaScript and CSS bundles - 15.509 s
success Rewriting compilation hashes - 0.021 s
success run page queries - 0.030 s — 3/3 371.64 queries/second

 ERROR #95313 

Building static HTML failed for path "/index"

See our docs page for more info on this error: https://gatsby.dev/debug-html



  TypeError: Cannot destructure property `edit` of 'undefined' or 'null'.
  
  - render-page.js:18111 Header
    /Users/djfumberger/Projects/docs/.docz/public/render-page.js:18111:898
  
  - react-dom-server.node.production.min.js:36 c
    [.docz]/[react-dom]/cjs/react-dom-server.node.production.min.js:36:500
  
  - react-dom-server.node.production.min.js:39 Ua
    [.docz]/[react-dom]/cjs/react-dom-server.node.production.min.js:39:16
  
  - react-dom-server.node.production.min.js:45 a.render
    [.docz]/[react-dom]/cjs/react-dom-server.node.production.min.js:45:48
  
  - react-dom-server.node.production.min.js:44 a.read
    [.docz]/[react-dom]/cjs/react-dom-server.node.production.min.js:44:161
  
  - react-dom-server.node.production.min.js:55 renderToString
    [.docz]/[react-dom]/cjs/react-dom-server.node.production.min.js:55:83
  
  - render-page.js:2763 Module../.cache/static-entry.js.__webpack_exports__.default
    /Users/djfumberger/Projects/docs/.docz/public/render-page.js:2763:28
  
  - render-html.js:35 
    [.docz]/[gatsby]/dist/utils/worker/render-html.js:35:36
  
  - debuggability.js:313 Promise._execute
    [.docz]/[bluebird]/js/release/debuggability.js:313:9
  
  - promise.js:488 Promise._resolveFromExecutor
    [.docz]/[bluebird]/js/release/promise.js:488:18
  
  - promise.js:79 new Promise
    [.docz]/[bluebird]/js/release/promise.js:79:10
  
  - render-html.js:31 
    [.docz]/[gatsby]/dist/utils/worker/render-html.js:31:37
  
  - util.js:16 tryCatcher
    [.docz]/[bluebird]/js/release/util.js:16:23
  
  - map.js:61 MappingPromiseArray._promiseFulfilled
    [.docz]/[bluebird]/js/release/map.js:61:38
  
  - promise_array.js:114 MappingPromiseArray.PromiseArray._iterate
    [.docz]/[bluebird]/js/release/promise_array.js:114:31
  
  - promise_array.js:78 MappingPromiseArray.init
    [.docz]/[bluebird]/js/release/promise_array.js:78:10
  

⠹ Building static HTML for pages
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
✨  Done in 24.24s.

Environment

  • OS: OSX 10.14.6
  • yarn 1.17.3
  • Docz: 2.0.0-rc.1

Thanks!

djfumberger avatar Aug 27 '19 02:08 djfumberger

Hey, thanks for reporting this issue. It should be fixed in 2.0.0-rc.5 Please let me know if it fixes it for you.

rakannimer avatar Aug 28 '19 17:08 rakannimer

Hello, hopefully this adds to the debugging effort

This is my output when running docz build

warning package.json: No license field
warning ../package.json: No license field
warning [email protected]: No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
info [email protected]: The engine "node" is incompatible with this module. Expected version "^8.16.0 || ^10.6.0 || >=11.0.0".
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗  Linking dependencies...
warning "gatsby > [email protected]" has incorrect peer dependency "[email protected]".
warning "docz > gatsby > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning "docz > gatsby > pnp-webpack-plugin > [email protected]" has unmet peer dependency "typescript@*".
warning " > [email protected]" has unmet peer dependency "eslint@^5.12.0".
warning " > [email protected]" has unmet peer dependency "eslint-loader@^2.1.1".
[4/4] 📃  Building fresh packages...

$ gatsby build
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success open and validate gatsby-configs - 2.736 s
success load plugins - 0.691 s
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success onPreInit - 0.533 s
success delete html and css files from previous builds - 0.050 s
info One or more of your plugins have changed since the last time you ran
Gatsby. As
a precaution, we're deleting your site's cache to ensure there's not any stale
success initialize cache - 0.055 s
success copy gatsby files - 0.126 s
success onPreBootstrap - 0.034 s
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success source and transform nodes - 0.420 s
⠋ building schema
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
✨  Done in 28.81s.

Environment

  • OSX => 10.14.6
  • yarn -v => v.1.9.4
  • node -v => v8.11.4
  • Docz => 2.0.0-rc.1

danieljoffe avatar Aug 28 '19 19:08 danieljoffe

Hey @dannyk08

Could you try updating docz to 2.0.0-rc.5 and trying again ?

yarn add -D docz@next
# or 
npm i -D docz@next

rakannimer avatar Aug 28 '19 20:08 rakannimer

This is the output errors. I tried building with rc5 and rc8 and the both failed

@rc5

$ gatsby build
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success open and validate gatsby-configs - 1.291 s
success load plugins - 0.310 s
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success onPreInit - 0.315 s
success delete html and css files from previous builds - 0.032 s
success initialize cache - 0.031 s
success copy gatsby files - 0.110 s
success onPreBootstrap - 0.028 s
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success source and transform nodes - 0.221 s
⠋ building schema
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@rc8

$ gatsby build
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success open and validate gatsby-configs - 1.385 s
success load plugins - 0.352 s
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success onPreInit - 0.537 s
success delete html and css files from previous builds - 0.036 s
success initialize cache - 0.039 s
success copy gatsby files - 0.095 s
success onPreBootstrap - 0.025 s
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
success source and transform nodes - 0.227 s
success Add explicit types - 0.017 s
success Add inferred types - 0.149 s
success Processing types - 0.069 s
success building schema - 0.308 s
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.

 ERROR #85901  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "allDoczEntries" on type "Query". Did you mean "allDoczDb"?

File: ../node_modules/gatsby-theme-docz/src/node/createPages.js:30:10

⠋ createPages
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Hope this helps

danieljoffe avatar Aug 29 '19 19:08 danieljoffe

@dannyk08 Think that's a seperate issue (#1007)

Thanks 2.0.0-rc.5 fixes the issue above!

djfumberger avatar Aug 30 '19 03:08 djfumberger