Развертывание Netlify завершается неудачно при сборке Gatsby - PullRequest
1 голос
/ 29 января 2020

4:51:19 PM: Build ready to start
4:51:21 PM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
4:51:21 PM: build-image tag: v3.3.5
4:51:21 PM: buildbot version: 036f37945d6de439a17a554b3ae02e2f8f0f1fb0
4:51:21 PM: Fetching cached dependencies
4:51:21 PM: Starting to download cache of 254.9KB
4:51:21 PM: Finished downloading cache in 87.118057ms
4:51:21 PM: Starting to extract cache
4:51:21 PM: Failed to fetch cache, continuing with build
4:51:21 PM: Starting to prepare the repo for build
4:51:21 PM: No cached dependencies found. Cloning fresh repo
4:51:21 PM: git clone https://github.com/AlexanderArchambeault/paintingslive2
4:51:22 PM: Preparing Git Reference refs/heads/master
4:51:23 PM: Starting build script
4:51:23 PM: Installing dependencies
4:51:24 PM: Downloading and installing node v10.18.1...
4:51:24 PM: Downloading https://nodejs.org/dist/v10.18.1/node-v10.18.1-linux-x64.tar.xz...
4:51:25 PM: 
####################################################
4:51:25 PM:                   72.5%
4:51:25 PM: 
###############################################
4:51:25 PM: ######################### 100.0%
4:51:25 PM: Computing checksum with sha256sum
4:51:25 PM: Checksums matched!
4:51:27 PM: Now using node v10.18.1 (npm v6.13.4)
4:51:27 PM: Attempting ruby version 2.6.2, read from environment
4:51:29 PM: Using ruby version 2.6.2
4:51:29 PM: Using PHP version 5.6
4:51:29 PM: Started restoring cached go cache
4:51:29 PM: Finished restoring cached go cache
4:51:29 PM: unset GOOS;
4:51:29 PM: unset GOARCH;
4:51:29 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
4:51:29 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
4:51:29 PM: go version >&2;
4:51:29 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
4:51:29 PM: go version go1.12 linux/amd64
4:51:29 PM: Installing missing commands
4:51:29 PM: Verify run directory
4:51:29 PM: Executing user command: gatsby build
4:51:29 PM: /usr/local/bin/build: line 64: gatsby: command not found
4:51:29 PM: Skipping functions preparation step: no functions directory set
4:51:29 PM: Caching artifacts
4:51:29 PM: Started saving pip cache
4:51:29 PM: Finished saving pip cache
4:51:29 PM: Started saving emacs cask dependencies
4:51:29 PM: Finished saving emacs cask dependencies
4:51:29 PM: Started saving maven dependencies
4:51:29 PM: Finished saving maven dependencies
4:51:29 PM: Started saving boot dependencies
4:51:29 PM: Finished saving boot dependencies
4:51:29 PM: Started saving go dependencies
4:51:29 PM: Finished saving go dependencies
4:51:32 PM: Error running command: Build script returned non-zero exit code: 127
4:51:32 PM: Failing build: Failed to build site
4:51:32 PM: failed during stage 'building site': Build script returned non-zero exit code: 127
4:51:32 PM: Finished processing build request in 11.100770754s

Так что эта ошибка не исчезнет go, и это должно быть проблемой с "/ usr / local / bin / build: line 64: gatsby: команда не найдена" и некоторая несовместимость с linux. но я работал над этим сайтом, чтобы получать ошибки только при развертывании! Любая помощь в решении этого вопроса со мной будет очень признательна.

1 Ответ

0 голосов
/ 29 января 2020

У меня была такая же ошибка. Это, вероятно, не несовместимость. Ошибка говорит вам, что в указанном каталоге репозитория команда build не может найти файлы, которые запускают процесс сборки gatsby, потому что их там нет.

Netlify по умолчанию (см. Документы) предполагается, что ваш проект gatsby находится в root вашего связанного репозитория. Если он находится в папке типа /projectFolder/, вам нужно указать netlify:

Base directory: projectFolder

Publish directory: projectFolder/public

...