npm install 时候报错 gifsicle@5.2.0 postinstall: `node lib/install.js`

> gifsicle@5.2.0 postinstall /usr/local/lib/node_modules/miniprogram-slim/node_modules/gifsicle
> node lib/install.js

  ⚠ connect ECONNREFUSED 0.0.0.0:443
  ⚠ gifsicle pre-build test failed
  ℹ compiling from source
  ✖ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/miniprogram-slim/node_modules/gifsicle/14acef94-4a69-4709-887f-16c28fb0a7b4'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gifsicle@5.2.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gifsicle@5.2.0 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:

解决办法:

应该在命令后加参数 --ignore-scripts

npm install --ignore-scripts
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐