错误 npm 运行安装程序"ERR! code ELIFECYCLE"



当我运行 npm 运行设置时克隆反应样板后,它的显示错误。

PS D:Reactreact-boilerplate> npm run setup
> react-boilerplate@4.0.0 presetup D:Reactreact-boilerplate
> npm i chalk shelljs

> pngquant-bin@5.0.2 postinstall D:Reactreact-boilerplatenode_modulespngquant-bin
> node lib/install.js
  ‼ Command failed: D:Reactreact-boilerplatenode_modulespngquant-binvendorpngquant.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:Reactreact-boilerplatenode_modulesexecaindex.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_modulesfsevents):
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:UsersCoderAppDataRoamingnpm-cache_logs2019-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:UsersCoderAppDataRoamingnpm-cache_logs2019-07-17T11_03_30_260Z-debug.log

你必须运行npm i chalk shelljs,然后npm run setup

最新更新