vercel: Gatsby site: missing cwebp-bin when processing images

This error is reported when building through now:

 > gatsby build
                          
2019-03-28T11:39:27.990Z  success open and validate gatsby-configs — 0.102 s
2019-03-28T11:39:28.426Z  success load plugins — 0.434 s
2019-03-28T11:39:29.443Z  success onPreInit — 1.017 s
2019-03-28T11:39:29.567Z  success delete html and css files from previous builds — 0.124 s
2019-03-28T11:39:29.621Z  success initialize cache — 0.054 s
2019-03-28T11:39:29.654Z  success copy gatsby files — 0.032 s
2019-03-28T11:39:29.663Z  success onPreBootstrap — 0.008 s
2019-03-28T11:39:29.701Z  Starting to fetch data from Prismic
2019-03-28T11:39:30.072Z  Fetch Prismic data: 371.311ms
2019-03-28T11:39:32.843Z  success source and transform nodes — 3.180 s
2019-03-28T11:39:35.869Z  success building schema — 3.026 s
2019-03-28T11:39:36.157Z  success createPages — 0.286 s
2019-03-28T11:39:36.280Z  success createPagesStatefully — 0.123 s
2019-03-28T11:39:36.285Z  success onPreExtractQueries — 0.006 s
2019-03-28T11:39:38.762Z  success update schema — 2.477 s
2019-03-28T11:39:39.718Z  success extract queries from components — 0.955 s
2019-03-28T11:39:45.082Z  error Failed to process image /tmp/13789429/.cache/gatsby-source-filesystem/08fce2429b41738ab9dd409d3d6e69d1/be15479058df5f868030f121498a400615e2f5ee_map.png
2019-03-28T11:39:45.346Z  
                            Error: Command failed: /tmp/13789429/node_modules/cwebp-bin/vendor/cwebp -quie  t -mt -q 50 -o /tmp/d7652fb6-c422-43b0-af36-33ce2cd81235 /tmp/7c0ae400-85f0-45  20-b047-c7e9e65953be
                            PNG support not compiled. Please install the libpng development package before   building.
                            Error! Could not process file /tmp/7c0ae400-85f0-4520-b047-c7e9e65953be
                            Error! Cannot read input picture file '/tmp/7c0ae400-85f0-4520-b047-c7e9e65953  be'

This error doesn’t happen with gatsby build directly, just when is called from the now builder.

Configuration as per https://zeit.co/examples/gatsby/

I am missing something?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 18 (6 by maintainers)

Most upvoted comments

This might be handy for someone else in the future:

apt install apt-file; apt-file update; apt-file search libGL.so.1` should let you know what package contains that dll file

I’m going to try again! Let’s see if it fixes

@styfle Thank you for the tips, but they didn’t work. Here’s the result of running the last yum install..:

.....
                          Installed:
                            automake.noarch 0:1.13.4-3.15.amzn1                                           
                            kernel-devel.x86_64 0:4.9.43-17.39.amzn1                                      
                            libjpeg-turbo-devel.x86_64 0:1.2.90-5.14.amzn1                                
                            libpng-devel.x86_64 2:1.2.49-2.14.amzn1                                       
                          
                          Dependency Installed:
                            hardlink.x86_64 1:1.0-10.4.amzn1                                              
                            libjpeg-turbo.x86_64 0:1.2.90-5.14.amzn1                                      
                            libpng.x86_64 2:1.2.49-2.14.amzn1                                             
                            perl-Test-Harness.noarch 0:3.28-3.6.amzn1                                     
                            perl-Thread-Queue.noarch 0:3.02-2.5.amzn1                                     
                            zlib-devel.x86_64 0:1.2.8-7.18.amzn1                                          
  Complete!
.....
 error Failed to process image /tmp/6cacdf03/content/blog/2019-02-17/images/banner.jpg
                            Error: JPEG support not compiled. Please install the libjpeg development packa  ge before building.
                            Error! Could not process file /tmp/a51140b8-509f-4467-9383-1a66fa9a91f9
                            Error! Cannot read input picture file '/tmp/a51140b8-509f-4467-9383-1a66fa9a91  f9'
                            
                            - index.js:231 Promise.all.then.arr
                              [6cacdf03]/[exec-buffer]/[execa]/index.js:231:11
                            
                            - next_tick.js:188 process._tickCallback
                              internal/process/next_tick.js:188:7
                                                      
(sharp:18485): GLib-CRITICAL **: 18:39:49.656: g_hash_table_lookup: assertion 'hash_table != NULL' failed
(sharp:18485): GLib-CRITICAL **: 18:39:49.708: g_hash_table_lookup: assertion 'hash_table != NULL' failed

The solution I presented above solved the problem!