When building the project yesterday evening, everything went perfectly fine. When I tried the same this morning without any changes to code (just started gatsby develop again), the project would no longer build.
It seems like the gatsby-source-drupal somehow fails, but tracing down with console.log did not enlighten me.
I have two repositories, one Drupal site with the data and one static Gatsby site which queries this site:
The data API runs at https://api.kcvvelewijt.be/jsonapi
Static site at https://preview.kcvvelewijt.be (build from yesterday night)
Yesterday's log:
3:50:44 AM: Executing user command: gatsby build
3:50:47 AM: success open and validate gatsby-configs โ 0.046
3:50:48 AM: success load plugins โ 0.966
3:50:48 AM: success onPreInit โ 0.024
3:50:48 AM: success delete html and css files from previous builds โ 0.018
3:50:48 AM: success initialize cache โ 0.021
3:50:48 AM: success copy gatsby files โ 0.039
3:50:48 AM: success onPreBootstrap โ 0.016
3:50:48 AM: info Starting to fetch data from Drupal
3:50:51 AM: success Fetch data from Drupal โ 2.939
3:50:52 AM: info Downloading remote files from Drupal
3:50:55 AM: success Remote file download โ 3.533
3:50:55 AM: success source and transform nodes โ 7.087
3:50:56 AM: success building schema โ 0.948
3:50:57 AM: success createPages โ 0.447
3:50:57 AM: success createPagesStatefully โ 0.082
3:50:57 AM: success onPreExtractQueries โ 0.020
3:50:57 AM: success update schema โ 0.096
3:50:58 AM: success extract queries from components โ 0.903
3:50:58 AM: success write out requires โ 0.023
3:50:58 AM: success write out redirect data โ 0.018
3:50:58 AM: success onPostBootstrap โ 0.023
3:50:58 AM: info bootstrap finished - 13.818 s
3:51:02 AM: success run static queries โ 4.297 โ 4/4 0.95 queries/second
3:51:22 AM: success Generating image thumbnails โ 20/20 - 23.942 s
3:51:47 AM: success Building production JavaScript and CSS bundles โ 44.777
3:51:47 AM: success Rewriting compilation hashes โ 0.056
3:52:27 AM: success run page queries โ 39.307 โ 163/163 4.16 queries/second
3:54:46 AM: success Generating image thumbnails โ 653/653 - 178.515 s
3:54:52 AM: success Building static HTML for pages โ 6.676 โ 163/163 56.37 pages/second
3:54:52 AM: info Done building in 248.112 sec
3:54:53 AM: Skipping functions preparation step: no functions directory set
3:54:53 AM: Caching artifacts
3:54:53 AM: Started saving node modules
3:54:53 AM: Finished saving node modules
3:54:53 AM: Started saving yarn cache
3:54:53 AM: Finished saving yarn cache
3:54:53 AM: Started saving pip cache
3:54:53 AM: Finished saving pip cache
3:54:53 AM: Started saving emacs cask dependencies
3:54:53 AM: Finished saving emacs cask dependencies
3:54:53 AM: Started saving maven dependencies
3:54:53 AM: Finished saving maven dependencies
3:54:53 AM: Started saving boot dependencies
3:54:53 AM: Finished saving boot dependencies
3:54:53 AM: Started saving go dependencies
3:54:55 AM: Finished saving go dependencies
3:54:55 AM: Build script success
3:54:55 AM: Starting to deploy site from 'public/'
3:54:56 AM: Creating deploy tree asynchronously
3:54:56 AM: Starting post processing
3:55:00 AM: Post processing done
3:55:00 AM: Site is live
3:55:02 AM: 0 new files to upload
3:55:02 AM: 0 new functions to upload
3:55:59 AM: Finished processing build request in 5m51.984734158s
8:26:49 AM: Executing user command: gatsby build
8:26:52 AM: success open and validate gatsby-configs โ 0.052
8:26:53 AM: success load plugins โ 0.969
8:26:53 AM: success onPreInit โ 0.037
8:26:53 AM: success delete html and css files from previous builds โ 0.026
8:26:53 AM: success initialize cache โ 0.028
8:26:53 AM: success copy gatsby files โ 0.063
8:26:53 AM: success onPreBootstrap โ 0.026
8:26:53 AM: info Starting to fetch data from Drupal
8:26:55 AM: success Fetch data from Drupal โ 1.501
8:26:55 AM: info Downloading remote files from Drupal
8:26:55 AM: success source and transform nodes โ 1.851
8:26:56 AM: success building schema โ 0.582
8:26:56 AM: error #85901 GRAPHQL
8:26:56 AM: There was an error in your GraphQL query:
8:26:56 AM: Cannot query field "allNodeArticle" on type "Query".
8:26:56 AM: File: gatsby-node.js:47:5
8:26:56 AM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
8:26:56 AM: error #85901 GRAPHQL
8:26:56 AM: There was an error in your GraphQL query:
8:26:56 AM: Cannot query field "allNodePage" on type "Query". Did you mean "allSitePage" or "allMediaImage"?
8:26:56 AM: File: gatsby-node.js:47:5
8:26:56 AM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
8:26:56 AM: error #85901 GRAPHQL
8:26:56 AM: There was an error in your GraphQL query:
8:26:56 AM: Cannot query field "allNodeTeam" on type "Query".
8:26:56 AM: File: gatsby-node.js:47:5
8:26:56 AM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
8:26:56 AM: error #85901 GRAPHQL
8:26:56 AM: There was an error in your GraphQL query:
8:26:56 AM: Cannot query field "allNodePlayer" on type "Query". Did you mean "allSitePage"?
8:26:56 AM: File: gatsby-node.js:47:5
8:26:56 AM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
8:26:56 AM: error #85901 GRAPHQL
8:26:56 AM: There was an error in your GraphQL query:
8:26:56 AM: Cannot query field "allNodeStaff" on type "Query".
8:26:56 AM: File: gatsby-node.js:47:5
8:26:56 AM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
8:26:56 AM: error #85901 GRAPHQL
8:26:56 AM: There was an error in your GraphQL query:
8:26:56 AM: Cannot query field "allTaxonomyTermCategory" on type "Query".
8:26:56 AM: File: gatsby-node.js:47:5
8:26:56 AM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
8:26:56 AM: Skipping functions preparation step: no functions directory set
8:26:56 AM: Caching artifacts
8:26:56 AM: Started saving node modules
8:26:56 AM: Finished saving node modules
8:26:56 AM: Started saving yarn cache
8:26:56 AM: Finished saving yarn cache
8:26:56 AM: Started saving pip cache
8:26:56 AM: Finished saving pip cache
8:26:56 AM: Started saving emacs cask dependencies
8:26:56 AM: Finished saving emacs cask dependencies
8:26:56 AM: Started saving maven dependencies
8:26:56 AM: Finished saving maven dependencies
8:26:56 AM: Started saving boot dependencies
8:26:56 AM: Finished saving boot dependencies
8:26:56 AM: Started saving go dependencies
8:26:58 AM: Finished saving go dependencies
8:26:58 AM: Error running command: Build script returned non-zero exit code: 1
8:26:58 AM: Failing build: Failed to build site
8:26:58 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
8:26:58 AM: Finished processing build request in 43.701531907s
Seems like the schema did not create properly + the "remote file download" is not printed.
const fileNodes = [...nodes.values()].filter(isFileNode); returns an empty array
System:
OS: macOS 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 9.11.2 - ~/.nvm/versions/node/v9.11.2/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v9.11.2/bin/npm
Languages:
Python: 2.7.15 - /usr/local/bin/python
Browsers:
Chrome: 76.0.3809.132
Firefox: 69.0
Safari: 12.1.1
npmGlobalPackages:
gatsby-cli: 2.7.26
I have the same issue local as on netlify (started failing on the same moment)
Also with all public and .cache folders cleared + with node 9 and 10 tested.
Sorry guys - apparently it was a permission issue on Drupal.
When I manually checked the "access content" permission for anonymous users, deploys worked again.
So somehow my config import must have been screwed up...
Gonna leave this here in case someone else receives this errors and doesn't know where to look ;-)
Most helpful comment
Sorry guys - apparently it was a permission issue on Drupal.
When I manually checked the "access content" permission for anonymous users, deploys worked again.
So somehow my config import must have been screwed up...
Gonna leave this here in case someone else receives this errors and doesn't know where to look ;-)