Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContentfulAssets localFile node is missing in the graphql query result with gatsby v2.18.0+ #19716

Closed
andaqui opened this issue Nov 22, 2019 · 3 comments
Assignees
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@andaqui
Copy link

andaqui commented Nov 22, 2019

Description

Seems like localFile node from gatsby-source-contentful is missing in graphql with the release of gatsby 2.18.0. Worked in gatsby 2.17.17.

Gatsby 2.18.0 missing localFile:
gatsby_localfile_2 18 0

Gatsby 2.17.17 not missing localFile:
gatsby_localfile_2 17 17

Steps to reproduce

Install gatsby 2.18.0 (or higher), add "downloadLocal: true" in gatsby-source-contentful in gatsby-config.js and connect to contentful with assets. Check GraphiQL IDE and localFile node is missing. If you install gatsby 2.17.17 localFile node exist.

Expected result

Expected localFile node to exist in the graphql query result.

Actual result

localFile node didnt exist in the graphql query result.

Environment

System:
OS: macOS 10.15.1
CPU: (4) x64 Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.4.0 - ~/.nvm/versions/node/v12.4.0/bin/node
Yarn: 1.17.0 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v12.4.0/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 78.0.3904.108
Firefox: 70.0
Safari: 13.0.3
npmPackages:
gatsby: ^2.18.0 => 2.18.0
gatsby-background-image: ^0.9.6 => 0.9.6
gatsby-image: ^2.2.30 => 2.2.33
gatsby-plugin-google-analytics: ^2.1.23 => 2.1.28
gatsby-plugin-google-tagmanager: ^2.1.15 => 2.1.17
gatsby-plugin-gtag: ^1.0.11 => 1.0.11
gatsby-plugin-hotjar-tracking: ^1.0.0 => 1.0.0
gatsby-plugin-html-attributes: ^1.0.5 => 1.0.5
gatsby-plugin-manifest: ^2.2.29 => 2.2.29
gatsby-plugin-react-helmet: ^3.1.13 => 3.1.15
gatsby-plugin-react-svg: ^2.1.2 => 2.1.2
gatsby-plugin-robots-txt: ^1.5.0 => 1.5.0
gatsby-plugin-sharp: ^2.3.2 => 2.3.2
gatsby-plugin-sitemap: ^2.2.19 => 2.2.21
gatsby-source-contentful: ^2.1.62 => 2.1.62
gatsby-source-filesystem: ^2.1.38 => 2.1.38
gatsby-transformer-remark: ^2.6.32 => 2.6.37
gatsby-transformer-sharp: ^2.3.2 => 2.3.5
npmGlobalPackages:
gatsby-cli: 2.8.8

@lordoffreaks
Copy link

I think the problem is in gatsby-source-filesystem, I'm using createRemoteFileNode and getting the same error now

@LekoArts LekoArts added the type: bug An issue or pull request relating to a bug in Gatsby label Nov 26, 2019
@vladar vladar self-assigned this Nov 26, 2019
@andaqui
Copy link
Author

andaqui commented Nov 28, 2019

The latest release fixes the issue. 🥇

@vladar
Copy link
Contributor

vladar commented Nov 29, 2019

The root cause of the issue is actually in the plugin. Fix in gatsby 2.18.5 is somewhat temporary. See the follow-up issue for some details #19876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

4 participants