Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build project becuase of missing libpng-dev library // WIN10 #14015

Closed
maciekgrzybek opened this issue May 13, 2019 · 4 comments
Closed
Labels
status: awaiting author response Additional information has been requested from the author

Comments

@maciekgrzybek
Copy link

Description

When I'm trying to build a new project with gatsby-cli, I'm getting error:

Error: pngquant failed to build, make sure that libpng-dev is installed

The same thing happens when trying to npm install on different gatsby project, cloned from repo.

Steps to reproduce

  • install gatsby cli
  • run command to create new project:
gatsby new my-blazing-fast-site

Expected result

The project should be installed and ready to run develop command.

Actual result

Isnstalation stopped because of the error:

> [email protected] postinstall C:\projects\my-blazing-fast-site\node_modules\pngquant-bin
> node lib/install.js

  ‼ Command failed: C:\projects\my-blazing-fast-site\node_modules\pngquant-bin\vendor\pngquant.exe --version


  ‼ pngquant pre-build test failed
  i compiling from source
  × Error: pngquant failed to build, make sure that libpng-dev is installed
    at Promise.all.then.arr (C:\projects\my-blazing-fast-site\node_modules\execa\index.js:231:11)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

[email protected] postinstall C:\projects\my-blazing-fast-site\node_modules\pngquant-bin
node lib/install.js

‼ Command failed: C:\projects\my-blazing-fast-site\node_modules\pngquant-bin\vendor\pngquant.exe --version

‼ pngquant pre-build test failed
i compiling from source
× Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (C:\projects\my-blazing-fast-site\node_modules\execa\index.js:231:11)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node lib/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Maciek\AppDa

Environment

System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Binaries:
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.17763.1.0
npmPackages:
gatsby: ^2.3.5 => 2.3.5
gatsby-image: ^2.0.37 => 2.0.37
gatsby-plugin-manifest: ^2.0.26 => 2.0.26
gatsby-plugin-offline: ^2.0.25 => 2.0.25
gatsby-plugin-react-helmet: ^3.0.11 => 3.0.11
gatsby-source-filesystem: ^2.0.28 => 2.0.28
gatsby-transformer-sharp: ^2.1.17 => 2.1.17

@pieh
Copy link
Contributor

pieh commented May 14, 2019

Could you try using troubleshooting instructions on https://www.gatsbyjs.org/docs/gatsby-on-windows/ ? If that doesn't help will try to debug from there

@pieh pieh added the status: awaiting author response Additional information has been requested from the author label May 14, 2019
@maciekgrzybek
Copy link
Author

Thanks @pieh I wasn't aware of that guide, I'll give it a go :)

@maciekgrzybek
Copy link
Author

Hey @pieh , cheers for that. I've installed windows-build-tools and that fixed it.

@liumaFx
Copy link

liumaFx commented Jun 5, 2020

how fixed ? It doesn't work on my pc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting author response Additional information has been requested from the author
Projects
None yet
Development

No branches or pull requests

3 participants