gatsbyjs / gatsby-starter-shopify

A Gatsby starter using the latest Shopify plugin showcasing a store with product overview, individual product pages, and a cart
https://shopify-demo.gatsbyjs.com/
BSD Zero Clause License
311 stars 137 forks source link

images.fallback not being defined #25

Open PolGuixe opened 3 years ago

PolGuixe commented 3 years ago

I am getting the following error:


failed Building static HTML for pages - 0.743s

 ERROR #95313 

Building static HTML failed for path "/products/"

See our docs page for more info on this error: https://gatsby.dev/debug-html

  69 |     sources: [],
  70 |   }
> 71 |   if (images.fallback) {
     |              ^
  72 |     cleanedImages.fallback = {
  73 |       ...images.fallback,
  74 |       srcSet: images.fallback.srcSet

  WebpackError: TypeError: Cannot read property 'fallback' of undefined

  - gatsby-image.server.tsx:71 
    gatsby-starter-shopify/src/components/gatsby-image.server.tsx:71:14

  - extends.js:3 
    [gatsby-starter-shopify]/[@babel]/runtime/helpers/extends.js:3:42

  - extends.js:2 
    [gatsby-starter-shopify]/[@babel]/runtime/helpers/extends.js:2:1

  - extends.js:13 
    [gatsby-starter-shopify]/[@babel]/runtime/helpers/extends.js:13:1

  - static-entry.js:263 
    gatsby-starter-shopify/.cache/static-entry.js:263:20

  - history.js:113 
    [gatsby-starter-shopify]/[@gatsbyjs]/reach-router/es/lib/history.js:113:1

error Command failed with exit code 1.

This is caused by some products not having images.

May be the issue belongs here: https://github.com/gatsbyjs/gatsby-source-shopify

FrankRuiiz commented 3 years ago

@PolGuixe Hello, were you able to get around this issue? Agree it looks to be a gatsby-source-shopify issue.