`getNode` returns null on upgrade from gatsby-source-contentful 2.1.88 to 2.2.5
See original GitHub issueDescription
Upgrading gatsby-source-contentful
from 2.1.88 to 2.2.5 resulted in build errors, as we’re unable to use gatsby’s getNode
function with a valid node id string. Using the graphql search I can find the node.
Of note: it’s a parent node to the current node we’re inspecting
Expected result
I should be able to fetch a node by getNode
on gatsby-source-contentful
2.2.5
Actual result
getNode
returns null
Environment
System: OS: macOS 10.15.2 CPU: (16) x64 Intel® Core™ i9-9980HK CPU @ 2.40GHz Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node Yarn: 1.19.2 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm Languages: Python: 3.7.6 - /usr/local/opt/python/libexec/bin/python Browsers: Chrome: 80.0.3987.163 Safari: 13.0.4 npmPackages: gatsby: ^2.20.12 => 2.20.12 gatsby-image: ^2.0.13 => 2.0.33 gatsby-plugin-canonical-urls: ^2.1.5 => 2.1.5 gatsby-plugin-catch-links: ^2.1.5 => 2.1.17 gatsby-plugin-favicon: ^3.1.6 => 3.1.6 gatsby-plugin-google-gtag: ^1.0.17 => 1.0.17 gatsby-plugin-hotjar: ^1.0.1 => 1.0.1 gatsby-plugin-netlify-cache: ^1.0.0 => 1.0.0 gatsby-plugin-polyfill-io: ^1.1.0 => 1.1.0 gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12 gatsby-plugin-robots-txt: ^1.3.0 => 1.3.0 gatsby-plugin-sass: ^2.0.1 => 2.0.7 gatsby-plugin-sharp: ^2.4.5 => 2.4.5 gatsby-plugin-sitemap: ^2.0.5 => 2.0.5 gatsby-plugin-typescript: ^2.0.15 => 2.0.15 gatsby-plugin-webpack-bundle-analyzer: ^1.0.5 => 1.0.5 gatsby-source-contentful: ^2.2.5 => 2.2.5 gatsby-source-filesystem: ^2.0.2 => 2.0.5 gatsby-source-stripe: ^3.0.4 => 3.0.4 gatsby-transformer-sharp: ^2.3.14 => 2.3.14 npmGlobalPackages: gatsby-cli: 2.11.5 I’ve also updated node to 12.16.1 – and still fails
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:22 (5 by maintainers)
You should open an issue if this is still a problem with the latest contentful source plugin
I can confirm that
gatsby-source-contentful@2.1.100
has solved my problem but it’s not the latest version of course.