Cannot deploy my website. Netlify says: Failed during stage 'building site': Build script returned non-zero exit code: 2

I cannot deploy my website. My website was working fine but suddenly when I try to update the “About” page with Netlify cms, on the admin page it shows that the changes have been saved and on the GitHub repo, the page is really updated. But on the deployment page of Netlify where I have connected my domain with the GitHub repo, it says that the deployment is failed. Also, I have integrated Stackbit to the Netlify.
This is the page that I was trying to update. https://wahaabsiddique.com/about
Also, I’ve attached the screenshot of the page and the deploy error code from Netlify.
I would really appreciate If someone could help me in this regard.

Build Log
7:12:33 PM: Build ready to start
7:12:34 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
7:12:34 PM: build-image tag: v3.4.1
7:12:34 PM: buildbot version: c6376102eedf4be6c6e5d685c7141e2eb612d47d
7:12:35 PM: Fetching cached dependencies
7:12:35 PM: Starting to download cache of 90.7MB
7:12:35 PM: Finished downloading cache in 526.291364ms
7:12:35 PM: Starting to extract cache
7:12:38 PM: Finished extracting cache in 2.934750425s
7:12:38 PM: Finished fetching cache in 3.481875348s
7:12:38 PM: Starting to prepare the repo for build
7:12:38 PM: Preparing Git Reference refs/heads/master
7:12:40 PM: Starting build script
7:12:40 PM: Installing dependencies
7:12:40 PM: Python version set to 2.7
7:12:41 PM: Started restoring cached node version
7:12:43 PM: Finished restoring cached node version
7:12:44 PM: v12.18.0 is already installed.
7:12:45 PM: Now using node v12.18.0 (npm v6.14.4)
7:12:45 PM: Started restoring cached build plugins
7:12:45 PM: Finished restoring cached build plugins
7:12:45 PM: Attempting ruby version 2.7.1, read from environment
7:12:46 PM: Using ruby version 2.7.1
7:12:47 PM: Using PHP version 5.6
7:12:47 PM: 5.2 is already installed.
7:12:47 PM: Using Swift version 5.2
7:12:47 PM: Installing Hugo 0.73.0
7:12:47 PM: Hugo Static Site Generator v0.73.0-428907CC/extended linux/amd64 BuildDate: 2020-06-23T16:40:09Z
7:12:47 PM: Started restoring cached go cache
7:12:47 PM: Finished restoring cached go cache
7:12:47 PM: go version go1.14.4 linux/amd64
7:12:47 PM: go version go1.14.4 linux/amd64
7:12:47 PM: Installing missing commands
7:12:47 PM: Verify run directory
7:12:48 PM: ​
7:12:48 PM: ┌─────────────────────────────┐
7:12:48 PM: │        Netlify Build        │
7:12:48 PM: └─────────────────────────────┘
7:12:48 PM: ​
7:12:48 PM: ❯ Version
7:12:48 PM:   @netlify/build 4.8.1
7:12:48 PM: ​
7:12:48 PM: ❯ Flags
7:12:48 PM:   deployId: 5f81c15117be70cd66406262
7:12:48 PM:   mode: buildbot
7:12:48 PM: ​
7:12:48 PM: ❯ Current directory
7:12:48 PM:   /opt/build/repo
7:12:48 PM: ​
7:12:48 PM: ❯ Config file
7:12:48 PM:   /opt/build/repo/netlify.toml
7:12:48 PM: ​
7:12:48 PM: ❯ Context
7:12:48 PM:   production
7:12:48 PM: ​
7:12:48 PM: ┌────────────────────────────────────┐
7:12:48 PM: │ 1. build.command from netlify.toml │
7:12:48 PM: └────────────────────────────────────┘
7:12:48 PM: ​
7:12:48 PM: $ ./stackbit-build.sh
7:12:48 PM: curl -s -X POST https://api.stackbit.com/project/5f42a2a734e5d6001c84600b/webhook/build/pull > /dev/null
7:12:48 PM: if [[ -z "${STACKBIT_API_KEY}" ]]; then
7:12:48 PM:     echo "WARNING: No STACKBIT_API_KEY environment variable set, skipping stackbit-pull"
7:12:48 PM: else
7:12:48 PM:     npx @stackbit/stackbit-pull --stackbit-pull-api-url=https://api.stackbit.com/pull/5f42a2a734e5d6001c84600b
7:12:48 PM: fi
7:12:48 PM: WARNING: No STACKBIT_API_KEY environment variable set, skipping stackbit-pull
7:12:48 PM: curl -s -X POST https://api.stackbit.com/project/5f42a2a734e5d6001c84600b/webhook/build/ssgbuild > /dev/null
7:12:48 PM: make prepare && hugo --source demo --baseURL "/"
7:12:48 PM: rm -rf demo
7:12:48 PM: mkdir -p demo/themes/hugo-coder
7:12:48 PM: rsync -av exampleSite/ demo
7:12:49 PM: sending incremental file list
7:12:49 PM: ./
7:12:49 PM: config.toml
7:12:49 PM: assets/
7:12:49 PM: assets/js/
7:12:49 PM: assets/js/dark-mode.js
7:12:49 PM: content/
7:12:49 PM: content/about.md
7:12:49 PM: content/about.pt-br.md
7:12:49 PM: content/ads.txt
7:12:49 PM: content/contact.md
7:12:49 PM: content/contact.pt-br.md
7:12:49 PM: content/google6ba9640fe16b2cf3.html
7:12:49 PM: content/private.key
7:12:49 PM: content/robots.txt
7:12:49 PM: content/sitemap1.xml
7:12:49 PM: content/posts/
7:12:49 PM: content/posts/aws-vs-azure-vs-firebase-vs-heroku-vs-netlify—how-to-choose-the-best-platform-for-web-projects.md
7:12:49 PM: content/posts/basics-of-engineering-drawing-by-zahid-ahmed-siddiqui-full-book-pdf-format.md
7:12:49 PM: content/posts/how-to-identify-a-smart-person-in-3-minutes.md
7:12:49 PM: content/posts/should-you-use-aws-or-firebase-for-the-back-end-of-your-mobile-app.md
7:12:49 PM: content/posts/the-7-phrases-you-should-never-say-to-anyone.md
7:12:49 PM: content/posts/the-basic-architecture-concepts.md
7:12:49 PM: content/snippets/
7:12:49 PM: content/snippets/_index.md
7:12:49 PM: content/snippets/go-squared.md
7:12:49 PM: content/snippets/woopra.md
7:12:49 PM: content/snippets/first/
7:12:49 PM: content/snippets/first/index.md
7:12:49 PM: content/snippets/second/
7:12:49 PM: content/snippets/second/index.md
7:12:49 PM: layouts/
7:12:49 PM: layouts/.gitkeep
7:12:49 PM: static/
7:12:49 PM: static/admin/
7:12:49 PM: static/admin/config.yml
7:12:49 PM: static/admin/index.html
7:12:49 PM: static/admin/netlify-identity.js
7:12:49 PM: static/images/
7:12:49 PM: static/images/1_a0bdxhaicfheazb1jbinra.png
7:12:49 PM: static/images/1_wi7v3z2vvs0ps-xppbi5la.jpeg
7:12:49 PM: static/images/1_wkeo2w7cbxjs4oq6esdu4g-1-.jpeg
7:12:49 PM: static/images/N90.jpg
7:12:49 PM: static/images/avatar1.jpg
7:12:49 PM: static/images/favicon-16x16.png
7:12:49 PM: static/images/favicon-32x32.png
7:12:49 PM: static/images/fireshot-capture-034-home-wahaab-siddique-www.wahaabsiddique.com.png
7:12:49 PM: static/images/wahaab-siddique.jpg
7:12:49 PM: sent 2,222,895 bytes  received 748 bytes  4,447,286.00 bytes/sec
7:12:49 PM: total size is 2,219,173  speedup is 1.00
7:12:49 PM: rsync -av --exclude='demo' --exclude='exampleSite' --exclude='.git' . demo/themes/hugo-coder
7:12:49 PM: sending incremental file list
7:12:49 PM: .editorconfig
7:12:49 PM: .gitattributes
7:12:49 PM: .gitignore
7:12:49 PM: CONTRIBUTORS.md
7:12:49 PM: LICENSE
7:12:49 PM: LICENSE.md
7:12:49 PM: Makefile
7:12:49 PM: README.md
7:12:49 PM: ads.txt
7:12:49 PM: inject-netlify-identity-widget.js
7:12:49 PM: netlify.toml
7:12:49 PM: stackbit-build.sh
7:12:49 PM: stackbit.yaml
7:12:49 PM: theme.toml
7:12:49 PM: .github/
7:12:49 PM: .github/pull_request_template.md
7:12:49 PM: .netlify/
7:12:49 PM: .netlify/plugins/
7:12:49 PM: archetypes/
7:12:49 PM: archetypes/default.md
7:12:49 PM: archetypes/posts.md
7:12:49 PM: assets/
7:12:49 PM: assets/scss/
7:12:49 PM: assets/scss/_base.scss
7:12:49 PM: assets/scss/_base_dark.scss
7:12:49 PM: assets/scss/_base_rtl.scss
7:12:49 PM: assets/scss/_content.scss
7:12:49 PM: assets/scss/_content_dark.scss
7:12:49 PM: assets/scss/_content_rtl.scss
7:12:49 PM: assets/scss/_footer.scss
7:12:49 PM: assets/scss/_footer_dark.scss
7:12:49 PM: assets/scss/_navigation.scss
7:12:49 PM: assets/scss/_navigation_dark.scss
7:12:49 PM: assets/scss/_navigation_rtl.scss
7:12:49 PM: assets/scss/_pagination.scss
7:12:49 PM: assets/scss/_variables.scss
7:12:49 PM: assets/scss/coder-dark.scss
7:12:49 PM: assets/scss/coder-rtl.scss
7:12:49 PM: assets/scss/coder.scss
7:12:49 PM: i18n/
7:12:49 PM: i18n/ar.toml
7:12:49 PM: i18n/de.toml
7:12:49 PM: i18n/en.toml
7:12:49 PM: i18n/es.toml
7:12:49 PM: i18n/fi.toml
7:12:49 PM: i18n/fr.toml
7:12:49 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
7:12:49 PM: i18n/he.toml
7:12:49 PM: i18n/hi.toml
7:12:49 PM: i18n/hu.toml
7:12:49 PM: i18n/it.toml
7:12:49 PM: i18n/ja.toml
7:12:49 PM: i18n/nl.toml
7:12:49 PM: i18n/pl.toml
7:12:49 PM: i18n/pt-br.toml
7:12:49 PM: i18n/ro.toml
7:12:49 PM: i18n/ru.toml
7:12:49 PM: i18n/se.toml
7:12:49 PM: i18n/sk.toml
7:12:49 PM: i18n/tr.toml
7:12:49 PM: i18n/zh-cn.toml
7:12:49 PM: images/
7:12:49 PM: images/screenshot.png
7:12:49 PM: images/tn.png
7:12:49 PM: images/logos/
7:12:49 PM: images/logos/favicon.png
7:12:49 PM: images/logos/favicon.svg
7:12:49 PM: images/logos/logomark.png
7:12:49 PM: images/logos/logomark.svg
7:12:49 PM: images/logos/logotype-a.png
7:12:49 PM: images/logos/logotype-a.svg
7:12:49 PM: images/logos/logotype-b.png
7:12:49 PM: images/logos/logotype-b.svg
7:12:49 PM: layouts/
7:12:49 PM: layouts/404.html
7:12:49 PM: layouts/index.html
7:12:49 PM: layouts/_default/
7:12:49 PM: layouts/_default/baseof.html
7:12:49 PM: layouts/_default/list.html
7:12:49 PM: layouts/_default/single.html
7:12:49 PM: layouts/partials/
7:12:49 PM: layouts/partials/404.html
7:12:49 PM: layouts/partials/adsense.html
7:12:49 PM: layouts/partials/footer.html
7:12:49 PM: layouts/partials/google-analytics.html
7:12:49 PM: layouts/partials/header.html
7:12:49 PM: layouts/partials/home.html
7:12:49 PM: layouts/partials/list.html
7:12:49 PM: layouts/partials/opengraph.html
7:12:49 PM: layouts/partials/page.html
7:12:49 PM: layouts/partials/pagination.html
7:12:49 PM: layouts/partials/social-share.html
7:12:49 PM: layouts/partials/twitter-card.html
7:12:49 PM: layouts/partials/analytics/
7:12:49 PM: layouts/partials/analytics/fathom.html
7:12:49 PM: layouts/partials/analytics/plausible.html
7:12:49 PM: layouts/partials/posts/
7:12:49 PM: layouts/partials/posts/commento.html
7:12:49 PM: layouts/partials/posts/disqus.html
7:12:49 PM: layouts/partials/posts/math.html
7:12:49 PM: layouts/partials/posts/series.html
7:12:49 PM: layouts/partials/posts/utterances.html
7:12:49 PM: layouts/partials/taxonomy/
7:12:49 PM: layouts/partials/taxonomy/categories.html
7:12:49 PM: layouts/partials/taxonomy/tags.html
7:12:49 PM: layouts/posts/
7:12:49 PM: layouts/posts/li.html
7:12:49 PM: layouts/posts/list.html
7:12:49 PM: layouts/posts/single.html
7:12:49 PM: resources/
7:12:49 PM: resources/_gen/
7:12:49 PM: resources/_gen/assets/
7:12:49 PM: resources/_gen/assets/js/
7:12:49 PM: resources/_gen/assets/js/js/
7:12:49 PM: resources/_gen/assets/js/js/dark-mode.js_d11fe7b62c27961c87ecd0f2490357b9.content
7:12:49 PM: resources/_gen/assets/js/js/dark-mode.js_d11fe7b62c27961c87ecd0f2490357b9.json
7:12:49 PM: resources/_gen/assets/scss/
7:12:49 PM: resources/_gen/assets/scss/scss/
7:12:49 PM: resources/_gen/assets/scss/scss/coder-dark.scss_1fcd9040f1144c65015c77e7b93bc5ac.content
7:12:49 PM: resources/_gen/assets/scss/scss/coder-dark.scss_1fcd9040f1144c65015c77e7b93bc5ac.json
7:12:49 PM: resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.content
7:12:49 PM: resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.json
7:12:49 PM: sent 307,386 bytes  received 1,990 bytes  618,752.00 bytes/sec
7:12:49 PM: total size is 299,822  speedup is 0.97
7:12:49 PM: Total in 0 ms
7:12:49 PM: Error: "demo/config.toml:12:1": unmarshal failed: Near line 12 (last key parsed ''): bare keys cannot contain '<'
7:12:49 PM: ​
7:12:49 PM: ┌─────────────────────────────┐
7:12:49 PM: │   "build.command" failed    │
7:12:49 PM: └─────────────────────────────┘
7:12:49 PM: ​
7:12:49 PM:   Error message
7:12:49 PM:   Command failed with exit code 255: ./stackbit-build.sh
7:12:49 PM: ​
7:12:49 PM:   Error location
7:12:49 PM:   In build.command from netlify.toml:
7:12:49 PM:   ./stackbit-build.sh
7:12:49 PM: ​
7:12:49 PM:   Resolved config
7:12:49 PM:   build:
7:12:49 PM:     command: ./stackbit-build.sh
7:12:49 PM:     commandOrigin: config
7:12:49 PM:     environment:
7:12:49 PM:       - INCOMING_HOOK_BODY
7:12:49 PM:       - INCOMING_HOOK_TITLE
7:12:49 PM:       - INCOMING_HOOK_URL
7:12:49 PM:       - HUGO_VERSION
7:12:49 PM:     publish: /opt/build/repo/demo/public
7:12:49 PM: Caching artifacts
7:12:49 PM: Started saving build plugins
7:12:49 PM: Finished saving build plugins
7:12:49 PM: Started saving pip cache
7:12:49 PM: Finished saving pip cache
7:12:49 PM: Started saving emacs cask dependencies
7:12:49 PM: Finished saving emacs cask dependencies
7:12:49 PM: Started saving maven dependencies
7:12:49 PM: Finished saving maven dependencies
7:12:49 PM: Started saving boot dependencies
7:12:49 PM: Finished saving boot dependencies
7:12:49 PM: Started saving go dependencies
7:12:49 PM: Finished saving go dependencies
7:12:49 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:12:49 PM: Failing build: Failed to build site
7:12:49 PM: Finished processing build request in 14.68862359s

Hey @WahaabSiddique,
Reading that log, I see this line 7:12:49 PM: Error: “demo/config.toml:12:1”: unmarshal failed: Near line 12 (last key parsed ‘’): bare keys cannot contain ‘<’

I’d start with that config.toml. Let us know if you resolve that error but your builds still aren’t completing, and we’ll take another look.

Ok, I’ll wait. Thanks. I hope you’ll fix it.

Hey @WahaabSiddique,
Sorry, I should have clarified- if I were you, I would start by investigating that config.toml. That is not a file that’s part of Netlify builds- presumably, it’s somewhere in your code, and it’s breaking your build because there’s a syntax error somewhere. If you find that you make changes to that file, but still cannot get your site to build, please come back and let us know.