gatsby: [gatsby-transformer-sharp] Fail when build

I got this error when run gatsby build, this error is happened. But when I use gatsby develop this error is not happen.

error UNHANDLED EXCEPTION


  RangeError: Invalid string length
  
  - join
  
  - Object.stringify
  
  - stringify.js:5 stringify
    [arnondoraBlog]/[json-stringify-safe]/stringify.js:5:15
  
  - index.js:56 
    [arnondoraBlog]/[gatsby]/dist/redux/index.js:56:60
  
  - lodash.js:10350 invokeFunc
    [arnondoraBlog]/[lodash]/lodash.js:10350:23
  
  - lodash.js:10397 trailingEdge
    [arnondoraBlog]/[lodash]/lodash.js:10397:18
  
  - lodash.js:10385 Timeout.timerExpired [as _onTimeout]
    [arnondoraBlog]/[lodash]/lodash.js:10385:18

After I investigated I found the problem from this following query in gatsby-node.js

                    image {
                      childImageSharp {
                        sizes(maxWidth: 1240 ) {
                          base64
                          tracedSVG
                          aspectRatio
                          src
                          srcSet
                          srcWebp
                          srcSetWebp
                          sizes
                          originalImg
                          originalName
                        }
       }
}

But after I change this query into original one, the problem is gone. I don’t know is this problem comes from this warning “vips warning: VipsJpeg: error reading resolution” I also wanna ask how to get rid of this warning.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

I’ll dig into more detail ASAP. Thank you for investing this problem. @KyleAMathews