2

[SOLVED]
When I try to create a new gatsby site (with gatsby new or starter) or try to install the dependencies for an existing one with yarn, I always get the following error:

⚠ write EPROTO 4403060160:error:1408F10B:SSL  
routines:ssl3_get_record:wrong version  
number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:  
 
⚠ pngquant pre-build test failed  
ℹ compiling from source  
✖ Error: pngquant failed to build, make sure that libpng is installed  
at /Users/path_to_project/node_modules/bin-build/node_modules/execa/index.js:231:11  
at runMicrotasks (<anonymous>)

I have libpng installed on my system (macos). How can I go about fixing my issue?

 System:
    OS: macOS 10.15.5
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.1 - ~/.nvm/versions/node/v12.18.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v12.18.1/bin/npm
  Languages:
    Python: 2.7.16 - /Users/user/.pyenv/shims/python
  Browsers:
    Chrome: 83.0.4103.116
    Firefox: 77.0.1
    Safari: 13.1.1
  npmPackages:
    gatsby: ^2.21.22 => 2.24.2
    gatsby-image: ^2.4.3 => 2.4.13
    gatsby-plugin-emotion: ^4.3.3 => 4.3.10
    gatsby-plugin-manifest: ^2.4.2 => 2.4.18
    gatsby-plugin-offline: ^3.2.1 => 3.2.17
    gatsby-plugin-react-helmet: ^3.3.1 => 3.3.10
    gatsby-plugin-sharp: ^2.6.2 => 2.6.19
    gatsby-source-filesystem: ^2.3.1 => 2.3.19
    gatsby-source-graphql: ^2.5.2 => 2.6.2
    gatsby-transformer-sharp: ^2.5.2 => 2.5.11

1 Answers1

1

I did run brew install pkg-config and it fixed the issue. More on this: https://github.com/gatsbyjs/gatsby/issues/20389