[已解决]
当我尝试创建一个新的gatsby站点(使用gatsby new
或启动程序)或尝试为现有的纱线安装依赖项时,总是会出现以下错误:
⚠ 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>)
我的系统上已安装libpng
(macos)。我该如何解决我的问题?
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
答案 0 :(得分:1)
我确实运行过brew install pkg-config
,它解决了该问题。有关此内容的更多信息:https://github.com/gatsbyjs/gatsby/issues/20389