首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >错误npm运行安装程序"ERR!code ELIFECYCLE“

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

Stack Overflow用户
提问于 2019-07-17 19:07:35
回答 1查看 603关注 0票数 0

在克隆react样板之后,当我运行npm run setup时,它显示了错误。

代码语言:javascript
运行
复制
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
EN

回答 1

Stack Overflow用户

发布于 2019-11-11 22:12:13

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

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57074461

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档