ryanwiemer / gatsby-starter-gcn

A starter template to build amazing static websites with Gatsby, Contentful and Netlify
https://gcn.netlify.app/
MIT License
511 stars 120 forks source link

webpack error #44

Closed inventanew closed 6 years ago

inventanew commented 6 years ago

I get this error when building locally,

error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

59 | 60 | <Link to={/${slug}/}>

61 | <Img fluid={heroImage.fluid} backgroundColor={'#eeeeee'} /> | ^ 62 | {title} 63 | {publishDate} 64 | <Excerpt

WebpackError: TypeError: Cannot read property 'fluid' of null

ryanwiemer commented 6 years ago

@inventanew,

It might have something to do with your local cache. Can you try running npm run clean?

That's a script that will run rm -rf public .cache for you. Alternatively you can manually delete the public and .cache folders.

Let me know if that resolves the issue.

ryanwiemer commented 6 years ago

This may be related to an upstream issue with Gatsby. See: https://github.com/gatsbyjs/gatsby/issues/8996

ryanwiemer commented 6 years ago

This is resolved by updating gatsby-source-contentful. I have also updated the starter to use the latest version with the fix.

See: v2.0.3

inventanew commented 6 years ago

thanks Ryan for the update, much appreciated! Your gatsby starter is the only one right now that has a contentful integration with tags. I have been looking into datocms but the examples are lacking and nav hamburger doesn't work on their site, the interface looks simpler than contentful (for clients)