【发布时间】:2021-01-11 18:27:19
【问题描述】:
要重新创建它,您可以克隆我的分支 github链接:-https://github.com/WOLFIEEEE/Gatsby-portfolio/tree/trying-heroku-1
你也可以看到错误链接:-https://app.netlify.com/sites/wolfie-portfolio/deploys/5feabd7bb15555000765b2f5
我正在将我的 strpi 部署到 heroku。当我在本地运行我的项目时,我没有收到任何错误,它运行顺利,当我将相同的东西推送到 github 和 Strapi 尝试构建它时失败了。
我是新手,如果有人可以帮助我,那将是很大的帮助
error Failed to retrieve metadata from image /opt/build/repo/src/assets/hero-img.png
10:55:49 AM:
10:55:49 AM:
10:55:49 AM: Error: Input file contains unsupported image format
10:55:49 AM:
10:55:49 AM: not finished run static queries - 0.053s
10:55:49 AM: npm ERR! code ELIFECYCLE
10:55:49 AM: npm ERR! errno 1
10:55:49 AM: npm ERR! gatsby-starter-hello-world@0.1.0 build: `gatsby build`
10:55:49 AM: npm ERR! Exit status 1
10:55:49 AM: npm ERR!
10:55:49 AM: npm ERR! Failed at the gatsby-starter-hello-world@0.1.0 build script.
10:55:49 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
10:55:49 AM: npm ERR! A complete log of this run can be found in:
10:55:49 AM: npm ERR! /opt/buildhome/.npm/_logs/2020-12-29T05_25_49_093Z-debug.log
10:55:49 AM:
10:55:49 AM: ────────────────────────────────────────────────────────────────
10:55:49 AM: "build.command" failed
10:55:49 AM: ────────────────────────────────────────────────────────────────
10:55:49 AM:
10:55:49 AM: Error message
10:55:49 AM: Command failed with exit code 1: npm run build
10:55:49 AM:
10:55:49 AM: Error location
10:55:49 AM: In Build command from Netlify app:
10:55:49 AM: npm run build ```
this is the error I got you can check above netlify link for more info
【问题讨论】:
-
我已经尝试过 "resolutions": { "sharp": "0.24.0" },这在 gatsby 有关 Image 的封闭问题中有所展示,但没有多大帮助
-
是否在本地构建?
-
是的,它确实构建了