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

Getting error "Cannot destructure property createNode of undefined or null" #43

Closed
robations opened this issue Feb 28, 2019 · 5 comments

Comments

@robations
Copy link

I was trying to follow the tutorial here but after adding the plugin config for gatsby-source-airtable I get the following error:

$ gatsby develop
success delete html and css files from previous builds — 0.014 s
success open and validate gatsby-config — 0.004 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
data
success copy gatsby files — 0.009 s
success onPreBootstrap — 0.435 s
error Plugin gatsby-source-airtable returned an error

  TypeError: Cannot destructure property `createNode` of 'undefined' or 'null'.
  
  - gatsby-node.js:10 Object.exports.sourceNodes
    [airtable-test]/[gatsby-source-airtable]/gatsby-node.js:10:43
  
  - api-runner-node.js:110 runAPI
    [airtable-test]/[gatsby]/dist/utils/api-runner-node.js:110:36
...

Environment

  • OS: MacOS 10.14.3
  • node: 10.15.1
  • gatsby-cli: 2.4.12

To reproduce:

gatsby new airtable-test https://github.com/davad/gatsby-hampton-theme
cd airtable-test
# this actually fails in my environment due to libvips vs sharp
# it's necessary to add a key to package.json e.g. resolutions.sharp = "0.21.3"
yarn # repeat install due to previous failure
# edit gatsby-config.js to add `gatsby-source-airtable` and one table as described in README (tutorial looks out of date)
gatsby develop
# fails with error as above

I'm fairly new to gatsby, am I missing something?

@robations
Copy link
Author

I suspect this is because this "theme" is actually a starter package that seeds the whole project with gatsby v1, even though gatsby-cli is v2.x. Fairly confusing.

@santiesteban
Copy link

@robations Did you figure out how to fix it?

@robations
Copy link
Author

@santiesteban I don't remember exactly, but I took a quick look at the project/experiment.

I think I changed the gatsby spec in package.json to version 2, and migrated the gatsby config. There's a guide here though I don't remember doing half this stuff.

@jbolda
Copy link
Owner

jbolda commented May 14, 2019

Yep, that blog post is rather out of date at this point.

@santiesteban
Copy link

@robations Thank you. I gave it a shot but that guide was a little beyond me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants