question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build Error - "Field does not exist" - 'keywords' in WordPressAttachment_MediaDetails

See original GitHub issue

Description

I’ve been working on a website using the WordPress data source for a couple months. Today, the build process to Netlify encountered an error. In the past I’ve been able to debug these errors, because they’ve been due to something on my end. This seems different.

I reverted the change I made between the previous build and this one, and the same error occurred.

I updated WordPress core on the source URL this afternoon, so that might have something to do with it.

Below is the error from the Netlify console:

2:16:21 PM: Error: Cannot get field 'keywords' from type 'WordPressAttachment_MediaDetails_ImageMeta'. Field does not exist.
2:16:21 PM:     at ObjectTypeComposer.getField (/opt/build/repo/node_modules/graphql-compose/lib/ObjectTypeComposer.js:167:13)
2:16:21 PM:     at ObjectTypeComposer.getFieldExtensions (/opt/build/repo/node_modules/graphql-compose/lib/ObjectTypeComposer.js:976:24)
2:16:21 PM:     at ObjectTypeComposer.extendFieldExtensions (/opt/build/repo/node_modules/graphql-compose/lib/ObjectTypeComposer.js:989:26)
2:16:21 PM:     at addFieldExtensions (/opt/build/repo/node_modules/gridsome/lib/graphql/nodes/index.js:153:25)
2:16:21 PM:     at addFieldExtensions (/opt/build/repo/node_modules/gridsome/lib/graphql/nodes/index.js:156:9)
2:16:21 PM:     at addInferredFields (/opt/build/repo/node_modules/gridsome/lib/graphql/nodes/index.js:141:9)
2:16:21 PM:     at createFields (/opt/build/repo/node_modules/gridsome/lib/graphql/nodes/index.js:113:3)
2:16:21 PM:     at createNodesSchema (/opt/build/repo/node_modules/gridsome/lib/graphql/nodes/index.js:30:5)
2:16:21 PM:     at createSchema (/opt/build/repo/node_modules/gridsome/lib/graphql/createSchema.js:60:3)
2:16:21 PM:     at Schema.buildSchema (/opt/build/repo/node_modules/gridsome/lib/app/Schema.js:28:28)
2:16:21 PM:     at Plugins.createSchema (/opt/build/repo/node_modules/gridsome/lib/app/Plugins.js:94:22)
2:16:21 PM:     at process._tickCallback (internal/process/next_tick.js:68:7)

Steps to reproduce

Running gridsome build on a project using WordPress as the data source might work, presumably on a WordPress site with the most recent version of WordPress, 5.2.3.

Expected result

The build normally succeeds without any issues

Actual result

The build failed, attempting to get the ‘keywords’ endpoint from WordPressAttachment_MediaDetails_ImageMeta

N.B. I’m not accessing that endpoint anywhere in the project. The only endpoints I’m accessing for WordPressAttachment_MediaDetails are: width height

Environment


Libs:
- gridsome version: 0.7.6
- @gridsome/cli version: 0.2.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hjvedvikcommented, Oct 3, 2019

@hacknug It seems like the WordPress plugin creates a reference to a post type that hasn’t been fetched. You can try to enable the DlmDownload post type for the REST API in WordPress. But I’ll take a look at how it was handled in earlier versions.

1reaction
hjvedvikcommented, Sep 28, 2019

The fix is in these lines. The other changes in the commit are mostly tests to ensure this doesn’t happen again 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error "query references a field that does not exist" but the Tags ...
As far as I can tell, I'm not referencing the Keywords field, and the Tags field appears to still exist (it is an...
Read more >
13.2.15.6 Subqueries with EXISTS or NOT EXISTS
If a subquery returns any rows at all, EXISTS subquery is TRUE , and NOT EXISTS subquery is FALSE . For example: SELECT...
Read more >
column does not exist error even when using the 'as' keyword
I get this error: ERROR: column "errors" does not exist LINE 11: where errors >= 1. even that i checked the result with...
Read more >
SQL Server EXISTS and NOT EXISTS - Devart Blog
SQL EXISTS is a logical operator that is used to check for the existence of rows in a database. It returns TRUE in...
Read more >
Search Operators | GovInfo
When field operators are used, a space should not be placed between ... One way to make sure that you do not get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found