我安装npm和所有的工作直到这个错误,我试图找出是什么导致这个问题,但没有成功。安装之后,我尝试运行'npm‘,但也有错误。我想是因为npm安装的问题。我试图安装pngquant模块,但也没有成功。
如果你知道一个方法,或者你已经面临同样的问题,请帮助我。我看到了关于它的其他问题,但有任何答复。请。
pngquant@4.0.0后安装/var/www/html/futebit/node_modules/pngquant-bin节点lib/install.js
⚠ The `/var/www/html/futebit/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
⚠ 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 (/var/www/html/futebit/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"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.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-07-16T14_17_27_195Z-debug.log发布于 2021-05-19 10:02:32
Pngquant需要vcruntime140.dll。从C++下载并安装Visual 2015 64位和32位Visual可再发行版
发布于 2019-01-14 15:22:46
错误状态为make sure that libpng-dev is installed。这意味着你可能错过了那个包裹。
在Debian/Ubuntu上,您可以使用sudo apt install libpng-dev修复它。对我起作用了。
发布于 2019-10-22 09:33:04
似乎您正在尝试使用预编译的二进制pngquant-bin,但是由于操作系统中使用的库不兼容,所以失败了,因此有两种使用它们的方法:
https://stackoverflow.com/questions/51364124
复制相似问题