2 votes

Erreur d'installation de npm : libpng-dev

OS: centos-release-6-10.el6.centos.12.3.x86_64

Version du nœud : v8.11.1

Version de NPM : 5.6.0

paquet.json

{
  "private": true,
  "scripts": {
    "dev": "npm run development",
    "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "npm run development -- --watch",
    "watch-poll": "npm run watch -- --watch-poll",
    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "prod": "npm run production",
    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "devDependencies": {
    "bootstrap-sass": "^3.3.7",
    "cross-env": "^5.2.0",
    "laravel-mix": "^2.0",
    "lodash": "^4.17.4"
  }
}

Quand j'essaie d'exécuter npm install il s'arrête avec les erreurs suivantes:-

 The `/home/dipengrg/project/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work corr
ectly
   pngquant pre-build test failed
   compiling from source   pngquant pre-build test passed successfully
   Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/home/dipengrg/project/node_modules/pngquant-bin/node_modules/bin-build/node_m
odules/execa/index.js:231:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (c
urrent: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Si j'essaie ensuite d'installer libpng-dev en utilisant npm install libpng-dev il rapporte : -

npm ERR! code E404
npm ERR! 404 Not Found: libpng-dev@latest

J'ai suivi et essayé cette solution mais le problème persiste.

Prograide.com

Prograide est une communauté de développeurs qui cherche à élargir la connaissance de la programmation au-delà de l'anglais.
Pour cela nous avons les plus grands doutes résolus en français et vous pouvez aussi poser vos propres questions ou résoudre celles des autres.

Powered by:

X