LekoArts / gatsby-starter-portfolio-bella

A bright single-page portfolio starter for Gatsby powered by Prismic.io. The target audience are designers and photographers.
https://portfolio-bella.netlify.com/
MIT License
124 stars 18 forks source link

TypeError: Cannot read property 'caseStudies' of undefined #2

Closed sparklesam closed 6 years ago

sparklesam commented 6 years ago

Hi! Thank you very much for your theme, I was trying to develop for the first time, after setting up the Prismic.io. However, I got the following errors:

TypeError: Cannot read property 'caseStudies' of undefined

which points to the GraphQL error

GraphQL Error Unknown fieldlocalFileon typeheaderImage_2`

file: .../src/pages/index.jsx

1 | 2 | query IndexQuery { 3 | caseStudies: allPrismicCaseStudy(sort: { fields: [last_publication_date], order: DESC }) { 4 | edges { 5 | node { 6 | uid 7 | data { 8 | header_image {

9 | localFile { | ^ 10 | childImageSharp { 11 | sizes( 12 | maxWidth: 900 13 | maxHeight: 900 14 | quality: 90 15 | traceSVG: { color: "#021212" } 16 | cropFocus: ENTROPY 17 | ) { 18 | ...GatsbyImageSharpSizes_withWebp_tracedSVG`

Any idea why this would happen?

I have uploaded my source file on github https://github.com/sparklesam/bella/tree/Develop-Portfolio/desktop

LekoArts commented 6 years ago

@sparklesam Oh, sorry for the delayed answer, I was on vacation.

Did you sort it out?

Did you copy the JSON file for the custom type?

LekoArts commented 6 years ago

Closing now. Please let me know if it’s still an issur