Gatsby with NetlifyCMS

Hi, All

I faced an Issue in build time when I added NetlifyCMS to Gatsbyjs Site.

notes:

  • Building working well locally
  • status code: 1

2:57:58 PM: Build ready to start
2:58:00 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
2:58:00 PM: build-image tag: v3.3.2
2:58:00 PM: buildbot version: 8727aab446158e7b8c8ad2e96fe74b0154505a4e
2:58:00 PM: Fetching cached dependencies
2:58:01 PM: Starting to download cache of 191.3MB
2:58:01 PM: Finished downloading cache in 970.073174ms
2:58:01 PM: Starting to extract cache
2:58:09 PM: Finished extracting cache in 7.553614534s
2:58:09 PM: Finished fetching cache in 8.703593967s
2:58:09 PM: Starting to prepare the repo for build
2:58:10 PM: Preparing Git Reference refs/heads/master
2:58:12 PM: Starting build script
2:58:12 PM: Installing dependencies
2:58:13 PM: Started restoring cached node version
2:58:15 PM: Finished restoring cached node version
2:58:16 PM: v10.16.3 is already installed.
2:58:17 PM: Now using node v10.16.3 (npm v6.9.0)
2:58:18 PM: Attempting ruby version 2.6.2, read from environment
2:58:19 PM: Using ruby version 2.6.2
2:58:20 PM: Using PHP version 5.6
2:58:20 PM: Started restoring cached node modules
2:58:20 PM: Finished restoring cached node modules
2:58:20 PM: Started restoring cached yarn cache
2:58:20 PM: Finished restoring cached yarn cache
2:58:21 PM: Installing NPM modules using Yarn version 1.17.0
2:58:21 PM: yarn install v1.17.0
2:58:22 PM: [1/4] Resolving packages…
2:58:23 PM: [2/4] Fetching packages…
2:58:49 PM: info fsevents@2.1.0: The platform “linux” is incompatible with this module.
2:58:49 PM: info “fsevents@2.1.0” is an optional dependency and failed compatibility check. Excluding it from installation.
2:58:49 PM: info fsevents@1.2.9: The platform “linux” is incompatible with this module.
2:58:49 PM: info “fsevents@1.2.9” is an optional dependency and failed compatibility check. Excluding it from installation.
2:58:49 PM: [3/4] Linking dependencies…
2:58:49 PM: warning " > bootstrap@4.3.1" has unmet peer dependency “jquery@1.9.1 - 3”.
2:58:49 PM: warning " > bootstrap@4.3.1" has unmet peer dependency “popper.js@^1.14.7”.
2:58:49 PM: warning “gatsby > eslint-config-react-app@4.0.1” has incorrect peer dependency “eslint-plugin-flowtype@2.x”.
2:58:49 PM: warning “gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.1” has unmet peer dependency “typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta”.
2:58:49 PM: warning “netlify-cms-app > netlify-cms-widget-markdown > slate-edit-list@0.11.3” has incorrect peer dependency “slate@^0.32.0”.
2:58:49 PM: warning “netlify-cms-app > netlify-cms-widget-markdown > slate-edit-table@0.15.2” has incorrect peer dependency “slate@^0.33.3”.
2:58:49 PM: warning “netlify-cms-app > netlify-cms-widget-markdown > slate-edit-table@0.15.2” has unmet peer dependency “slate-schema-violations@^0.1.7”.
2:58:49 PM: warning “netlify-cms-app > netlify-cms-core > redux-notifications > react-redux@4.4.10” has incorrect peer dependency “redux@^2.0.0 || ^3.0.0”.
2:58:49 PM: warning " > react-google-maps@9.4.5" has unmet peer dependency “@types/googlemaps@^3.0.0”.
2:58:49 PM: warning " > react-google-maps@9.4.5" has unmet peer dependency “@types/markerclustererplus@^2.1.29”.
2:58:49 PM: warning " > react-google-maps@9.4.5" has unmet peer dependency “@types/react@^15.0.0 || ^16.0.0”.
2:59:01 PM: [4/4] Building fresh packages…
2:59:04 PM: Done in 42.65s.
2:59:04 PM: NPM modules installed using Yarn
2:59:05 PM: Started restoring cached go cache
2:59:05 PM: Finished restoring cached go cache
2:59:05 PM: unset GOOS;
2:59:05 PM: unset GOARCH;
2:59:05 PM: export GOROOT=’/opt/buildhome/.gimme/versions/go1.12.linux.amd64’;
2:59:05 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
2:59:05 PM: go version >&2;
2:59:05 PM: export GIMME_ENV=’/opt/buildhome/.gimme/env/go1.12.linux.amd64.env’;
2:59:05 PM: go version go1.12 linux/amd64
2:59:05 PM: Installing missing commands
2:59:05 PM: Verify run directory
2:59:05 PM: Executing user command: gatsby build
2:59:07 PM: success open and validate gatsby-configs — 0.049
2:59:08 PM: success load plugins — 1.162
2:59:08 PM: success onPreInit — 0.027
2:59:08 PM: success delete html and css files from previous builds — 0.026
2:59:08 PM: success initialize cache — 0.034
2:59:08 PM: success copy gatsby files — 0.053
2:59:08 PM: success onPreBootstrap — 0.023
2:59:09 PM: error
2:59:09 PM: The path passed to gatsby-source-filesystem does not exist on your file system:
2:59:09 PM: /opt/build/repo/static/img
2:59:09 PM: Please pick a path to an existing directory.
2:59:09 PM: See docs here - https://www.gatsbyjs.org/packages/gatsby-source-filesystem/
2:59:09 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
2:59:09 PM: Skipping functions preparation step: no functions directory set
2:59:09 PM: Caching artifacts
2:59:09 PM: Started saving node modules
2:59:09 PM: Finished saving node modules
2:59:09 PM: Started saving yarn cache
2:59:09 PM: Finished saving yarn cache
2:59:09 PM: Started saving pip cache
2:59:09 PM: Finished saving pip cache
2:59:09 PM: Started saving emacs cask dependencies
2:59:09 PM: Finished saving emacs cask dependencies
2:59:09 PM: Started saving maven dependencies
2:59:09 PM: Finished saving maven dependencies
2:59:09 PM: Started saving boot dependencies
2:59:09 PM: failed during stage ‘building site’: Build script returned non-zero exit code: 1
2:59:09 PM: Finished saving boot dependencies
2:59:09 PM: Shutting down logging, 5 messages pending
2:59:09 PM: Started saving go dependencies
2:59:09 PM: Finished saving go dependencies
2:59:09 PM: Error running command: Build script returned non-zero exit code: 1

Since this is working locally for you maybe you have not versioned ( commit and push ) the ‘img’ folder?

1 Like