操作系统:Win 10
windows-build-tools已安装。
当我尝试使用npm install --save gatsby-plugin-sharp
安装gatsby-plugin-sharp时。我收到两个错误。
我曾经尝试过npm install --save-dev pngquant --msvs_version=2013
,就像有人提到过的那样。但是它导致了同样的错误,没有'libpng-dev'。
\> mozjpeg@6.0.1 postinstall C:\Users\54391\Documents\code\personal-blog\node_modules\mozjpeg
\> node lib/install.js
‼ getaddrinfo ENOENT raw.githubusercontent.com
‼ mozjpeg pre-build test failed
i compiling from source
× Error: Command failed: C:\Windows\system32\cmd.exe /s /c "autoreconf -fiv"
'autoreconf' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
at C:\Users\54391\Documents\code\personal-blog\node_modules\bin-build\node_modules\execa\index.js:231:11
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 0)
\> pngquant-bin@5.0.2 postinstall C:\Users\54391\Documents\code\personal-blog\node_modules\pngquant-bin
\> node lib/install.js
‼ getaddrinfo ENOENT raw.githubusercontent.com
‼ pngquant pre-build test failed
i compiling from source
× Error: pngquant failed to build, make sure that libpng-dev is installed
at C:\Users\54391\Documents\code\personal-blog\node_modules\bin-build\node_modules\execa\index.js:231:11
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 0)