【问题标题】:Netlify fails to deploy GatsbyJS projectNetlify 部署 GatsbyJS 项目失败
【发布时间】:2021-01-24 17:45:57
【问题描述】:

我有一段时间没有使用 Netlify,我相信上次是 2020 年 6 月,但现在我想更新我以前的一个项目。但是,当我尝试对推送到 github 的更改进行 delpoy 时,我收到错误消息:

6:37:55 PM: ────────────────────────────────────────────────────────────────
6:37:55 PM:   "build.command" failed                                        
6:37:55 PM: ────────────────────────────────────────────────────────────────
6:37:55 PM: ​
6:37:55 PM:   Error message
6:37:55 PM:   Command was killed with SIGSEGV (Segmentation fault): gatsby build
6:37:55 PM: ​
6:37:55 PM:   Error location
6:37:55 PM:   In Build command from Netlify app:
6:37:55 PM:   gatsby build
6:37:55 PM: ​
6:37:55 PM:   Resolved config
6:37:55 PM:   build:
6:37:55 PM:     base: /opt/build/repo
6:37:55 PM:     command: gatsby build
6:37:55 PM:     commandOrigin: ui
6:37:55 PM:     publish: /opt/build/repo/public

   
                           

我google了很多,发现了一些关于使用CI= npm run build的帖子,我确实尝试过,我不确定应该在哪里插入命令,所以我尝试将它插入到部署设置和 package.json在我的项目中,我收到此错误消息:

6:27:10 PM:   Error message
6:27:10 PM:   Command failed with exit code 139: CI= npm run build

我尝试了不同的变体,但我总是得到两个错误代码中的任何一个。有人对可能出现的问题有任何建议吗?

以下是两个部署转储的要点链接:https://gist.github.com/PotatoPope/ef00c5d3b53fdb860ce29112cfa1a92e

【问题讨论】:

    标签: reactjs gatsby netlify


    【解决方案1】:

    您无需将其插入到您的 package.json 文件中,只需在您的构建和部署设置中将其设置为构建命令

    【讨论】:

    • 你能尝试通过 Netlify CLI 部署吗github.com/netlify/cli
    • 这工作完美无缺,谢谢。你知道是什么导致了这个错误吗?
    猜你喜欢
    • 2021-10-27
    • 1970-01-01
    • 2021-08-11
    • 2022-09-09
    • 1970-01-01
    • 2022-09-25
    • 2019-11-14
    • 1970-01-01
    相关资源
    最近更新 更多