Buffer使用以及对图片操作通过sharp库对图片进行操作

npm安装sharp出现问题解决

安装失败的报错

npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
npm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips"

sharp基于 libvips封装,所以在安装的时候会去下载 libvips 的本体,所以最好提前配置镜像

安装成功截图

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注