wesbos / master-gatsby

slick slices eh
358 stars 388 forks source link

Error when adding gatsby-source-sanity plugin to gatsby-config #77

Closed matt-peck closed 3 years ago

matt-peck commented 3 years ago

Module #5 / Video #17 The video adds the gatsby-source-sanity plugin to gatsby-config. I was unable to get npm start to work after updating the file and received this error message in the terminal:

Screen Shot 2021-01-03 at 12 30 36 PM

After trying a few things I visited this link: https://github.com/sanity-io/gatsby-source-sanity#basic-usage

Key sentence: "You should redeploy the GraphQL API everytime you make changes to the schema that you want to use in Gatsby by running sanity graphql deploy from within your Sanity project directory"

I had to open up the sanity folder in the project and run the command sanity graphql deploy and the I was able to run npm start again successfully.

matt-peck commented 3 years ago

I guess I'll just finish watching the video next time LOL

wesbos commented 3 years ago

Haha I had the same problem in the video. Thanks anyway! Enjoy the rest