盖茨比在mozjpeg上构建失败 [英] Gatsby build failing on mozjpeg

查看:223
本文介绍了盖茨比在mozjpeg上构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从昨天开始,我无法将我的Gatsby站点部署到我们的服务器,内部版本抱怨mozjpeg库.有人遇到过此错误吗?

From yesterday I am unable to deploy my Gatsby site to our server, build is complaining about mozjpeg library. Have anyone encountered this error before?

我尝试过:

  • 锁定gatsby-cli
  • 添加 automake linux软件包
  • 添加 libtools linux软件包
  • 解冻纱线锁
  • 在没有锁定文件的情况下安装依赖项
  • locking gatsby-cli
  • adding automake linux package
  • adding libtools linux package
  • unfreezing yarn lock
  • installing dependencies without lock file

但是似乎没有任何帮助,错误如下:

But nothing seemed to help, the error is as follows:

error /node_modules/mozjpeg: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: /node_modules/mozjpeg
Output:
⚠ spawn /node_modules/mozjpeg/vendor/cjpeg ENOENT
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c ./configure --enable-static --disable-shared --disable-dependency-tracking --with-jpeg8 --prefix="/node_modules/mozjpeg/vendor" --bindir="/node_modules/mozjpeg/vendor" --libdir="/node_modules/mozjpeg/vendor"

操作系统Ubuntu 16.04.6节点12.14盖茨比2.19.7

OS Ubuntu 16.04.6 Node 12.14 Gatsby 2.19.7

推荐答案

根据一些GitHub线程:

According to some GitHub threads:

他们建议:

  • 安装 nasm (强烈建议)
  • 如果上述解决方案无效,请安装 automake autoconf libtool dpkg pkgconfig libpng libpng-dev g ++
  • 删除缓存
  • Installing nasm (highly recommended)
  • If the solution above doesn't work, install automake, autoconf, libtool, dpkg, pkgconfig, libpng, libpng-dev, g++
  • Remove cache

这篇关于盖茨比在mozjpeg上构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆