0

After cloning the react boilerplate when I ran the npm run setup its show error.

PS D:\React\react-boilerplate> npm run setup

> react-boilerplate@4.0.0 presetup D:\React\react-boilerplate
> npm i chalk shelljs


> pngquant-bin@5.0.2 postinstall D:\React\react-boilerplate\node_modules\pngquant-bin
> node lib/install.js

  ‼ Command failed: D:\React\react-boilerplate\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 (D:\React\react-boilerplate\node_modules\execa\index.js:231:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
npm WARN connected-react-router@6.4.0 requires a peer of react-redux@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-styled-components@6.3.1 requires a peer of styled-components@^2.0.0 || ^3.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@5.0.2 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@5.0.2 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\Coder\AppData\Roaming\npm-cache\_logs\2019-07-17T11_03_29_890Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-boilerplate@4.0.0 presetup: `npm i chalk shelljs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-boilerplate@4.0.0 presetup 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\Coder\AppData\Roaming\npm-cache\_logs\2019-07-17T11_03_30_260Z-debug.log
ray
  • 5,454
  • 1
  • 18
  • 40

1 Answers1

-1

you must run npm i chalk shelljs, then npm run setup

  • 1
    `npm i chalk shelljs` is the very first part of the script `npm run setup`, running it first would give you the exact same error. – Jake Luby Nov 11 '19 at 14:21