codeanitdotcom / codeanitdotcom.github.io

codeanit.com by @codeanit
https://codeanit.com
MIT License
0 stars 1 forks source link

Bug: Build should fail when error is thrown #26

Open anitsh opened 3 years ago

anitsh commented 3 years ago

Development completes successfully although there is a failure.

yarn dev


yarn run v1.22.4
$ gatsby clean && gatsby develop
info Deleting .cache, public
info Successfully deleted directories
success open and validate gatsby-configs - 0.082s
success load plugins - 0.993s
success onPreInit - 0.028s
success initialize cache - 0.026s
success copy gatsby files - 0.045s
success onPreBootstrap - 0.031s
success createSchemaCustomization - 0.015s

ERROR #11321 PLUGIN

"gatsby-plugin-mdx" threw an error while running the onCreateNode lifecycle:

missed comma between flow collection entries at line 7, column 50: ... netes', 'devops', 'overview', ''series', 'part_5', 'controllers'] ^/home/anit/Work/codeanit.com/content/kubernetes-controller-part_5.md: missed comma between flow collection entries at line 7, column 50: ... netes', 'devops', 'overview', ''series', 'part_5', 'controllers'] ^

YAMLException: missed comma between flow collection entries at line 7, colu mn 50: ... netes', 'devops', 'overview', ''series', 'part_5', 'controllers'] ^/home/anit/Work/codeanit.com/cont ent/kubernetes-controller-part_5.md: missed comma between flow collection e ntries at line 7, column 50: ... netes', 'devops', 'overview', ''series', 'part_5', 'controllers'] ^

success source and transform nodes - 3.561s success building schema - 0.553s success createPages - 5.953s success createPagesStatefully - 0.300s success onPreExtractQueries - 0.005s success update schema - 0.118s success extract queries from components - 0.665s success write out requires - 0.524s success write out redirect data - 0.046s success Build manifest and related icons - 0.756s success onPostBootstrap - 0.989s ⠀ info bootstrap finished - 16.993 s ⠀ success run queries - 0.683s - 12/12 17.56/s success Generating image thumbnails - 18.085s - 40/40 2.21/s ⠀ You can now view codeanit.com in the browser. ⠀ http://localhost:8000/ ⠀ View GraphiQL, an in-browser IDE, to explore your site's data and schema ⠀ http://localhost:8000/___graphql ⠀ Note that the development build is not optimized. To create a production build, use gatsby build ⠀ success Building development bundle - 8.592s

————————————————————————————————————————————————————————————————————————————— Success codeanit.com 10 pages

anitsh commented 3 years ago

The build process fails in Netlify:

6:25:59 PM: Build ready to start
6:26:02 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
6:26:02 PM: build-image tag: v3.3.20
6:26:02 PM: buildbot version: 78b5536ab4f742c26705d3e953381b9cde6e22ef
6:26:02 PM: Fetching cached dependencies
6:26:03 PM: Starting to download cache of 408.6MB
6:26:05 PM: Finished downloading cache in 2.719141318s
6:26:05 PM: Starting to extract cache
6:26:22 PM: Finished extracting cache in 16.576481553s
6:26:22 PM: Finished fetching cache in 19.386527639s
6:26:22 PM: Starting to prepare the repo for build
6:26:22 PM: Preparing Git Reference refs/heads/master
6:26:24 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
6:26:24 PM: Starting build script
6:26:24 PM: Installing dependencies
6:26:24 PM: Python version set to 2.7
6:26:24 PM: Started restoring cached node version
6:26:27 PM: Finished restoring cached node version
6:26:28 PM: v10.21.0 is already installed.
6:26:29 PM: Now using node v10.21.0 (npm v6.14.4)
6:26:29 PM: Started restoring cached build plugins
6:26:29 PM: Finished restoring cached build plugins
6:26:29 PM: Attempting ruby version 2.6.2, read from environment
6:26:30 PM: Using ruby version 2.6.2
6:26:31 PM: Using PHP version 5.6
6:26:31 PM: 5.2 is already installed.
6:26:31 PM: Using Swift version 5.2
6:26:31 PM: Started restoring cached node modules
6:26:31 PM: Finished restoring cached node modules
6:26:31 PM: Started restoring cached yarn cache
6:26:31 PM: Finished restoring cached yarn cache
6:26:31 PM: Installing NPM modules using Yarn version 1.17.0
6:26:32 PM: yarn install v1.17.0
6:26:32 PM: [1/5] Resolving packages...
6:26:33 PM: success Already up-to-date.
6:26:33 PM: Done in 1.32s.
6:26:33 PM: NPM modules installed using Yarn
6:26:34 PM: Started restoring cached go cache
6:26:35 PM: Finished restoring cached go cache
6:26:35 PM: Installing Go version 1.12
6:26:35 PM: unset GOOS;
6:26:35 PM: unset GOARCH;
6:26:35 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64';
6:26:35 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}";
6:26:35 PM: go version >&2;
6:26:35 PM: export GIMME_ENV='/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env';
6:26:35 PM: go version go1.12 linux/amd64
6:26:35 PM: Installing missing commands
6:26:35 PM: Verify run directory
6:26:36 PM: ​
6:26:36 PM: ┌─────────────────────────────┐
6:26:36 PM: │        Netlify Build        │
6:26:36 PM: └─────────────────────────────┘
6:26:36 PM: ​
6:26:36 PM: ❯ Version
6:26:36 PM:   @netlify/build 2.0.27
6:26:36 PM: ​
6:26:36 PM: ❯ Flags
6:26:36 PM:   deployId: 5f0ef95b8036c0000731ab89
6:26:36 PM:   mode: buildbot
6:26:36 PM: ​
6:26:36 PM: ❯ Current directory
6:26:36 PM:   /opt/build/repo
6:26:36 PM: ​
6:26:36 PM: ❯ Config file
6:26:36 PM:   No config file was defined: using default values.
6:26:36 PM: ​
6:26:36 PM: ❯ Context
6:26:36 PM:   production
6:26:36 PM: ​
6:26:36 PM: ┌───────────────────────────────────┐
6:26:36 PM: │ 1. Build command from Netlify app │
6:26:36 PM: └───────────────────────────────────┘
6:26:36 PM: ​
6:26:36 PM: $ gatsby clean && gatsby build
6:26:38 PM: info Deleting .cache, public
6:26:38 PM: info Successfully deleted directories
6:26:40 PM: success open and validate gatsby-configs - 0.057s
6:26:42 PM: success load plugins - 1.453s
6:26:42 PM: success onPreInit - 0.011s
6:26:42 PM: success delete html and css files from previous builds - 0.014s
6:26:42 PM: success initialize cache - 0.010s
6:26:42 PM: success copy gatsby files - 0.032s
6:26:42 PM: success onPreBootstrap - 0.012s
6:26:42 PM: success createSchemaCustomization - 0.006s
6:26:43 PM: error "gatsby-plugin-mdx" threw an error while running the onCreateNode lifecycle:
6:26:43 PM: missed comma between flow collection entries at line 7, column 50:
6:26:43 PM:      ... netes', 'devops', 'overview', ''series', 'part_5', 'controllers']
6:26:43 PM:                                          ^/opt/build/repo/content/kubernetes-controller-part_5.md: missed comma between flow collection entries at line 7, column 50:
6:26:43 PM:      ... netes', 'devops', 'overview', ''series', 'part_5', 'controllers']
6:26:43 PM:                                          ^
6:26:43 PM: 
6:26:43 PM: 
6:26:43 PM:   YAMLException: missed comma between flow collection entries at line 7, column   50:
6:26:43 PM:        ... netes', 'devops', 'overview', ''series', 'part_5', 'controllers']
6:26:43 PM:                                            ^/opt/build/repo/content/kubernetes-c  ontroller-part_5.md: missed comma between flow collection entries at line 7, c  olumn 50:
6:26:43 PM:        ... netes', 'devops', 'overview', ''series', 'part_5', 'controllers']
6:26:43 PM:                                            ^
6:26:43 PM:   
6:26:43 PM:   - loader.js:167 generateError
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:167:10
6:26:43 PM:   
6:26:43 PM:   - loader.js:173 throwError
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:173:9
6:26:43 PM:   
6:26:43 PM:   - loader.js:718 readFlowCollection
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:718:7
6:26:43 PM:   
6:26:43 PM:   - loader.js:1360 composeNode
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:1360:11
6:26:43 PM:   
6:26:43 PM:   - loader.js:1089 readBlockMapping
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:1089:11
6:26:43 PM:   
6:26:43 PM:   - loader.js:1359 composeNode
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:1359:12
6:26:43 PM:   
6:26:43 PM:   - loader.js:1525 readDocument
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:1525:3
6:26:43 PM:   
6:26:43 PM:   - loader.js:1588 loadDocuments
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:1588:5
6:26:43 PM:   
6:26:43 PM:   - loader.js:1614 load
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:1614:19
6:26:43 PM:   
6:26:43 PM:   - loader.js:1637 Object.safeLoad
6:26:43 PM:     [repo]/[js-yaml]/lib/js-yaml/loader.js:1637:10
6:26:43 PM:   
6:26:43 PM:   - parse.js:12 module.exports
6:26:43 PM:     [repo]/[gray-matter]/lib/parse.js:12:17
6:26:43 PM:   
6:26:43 PM:   - index.js:109 parseMatter
6:26:43 PM:     [repo]/[gray-matter]/index.js:109:17
6:26:43 PM:   
6:26:43 PM:   - index.js:50 matter
6:26:43 PM:     [repo]/[gray-matter]/index.js:50:10
6:26:43 PM:   
6:26:43 PM:   - mdx.js:12 mdxToJsx
6:26:43 PM:     [repo]/[gatsby-plugin-mdx]/utils/mdx.js:12:29
6:26:43 PM:   
6:26:43 PM:   - create-mdx-node.js:9 module.exports
6:26:43 PM:     [repo]/[gatsby-plugin-mdx]/utils/create-mdx-node.js:9:18
6:26:43 PM:   
6:26:43 PM:   - on-create-node.js:49 Object.module.exports [as onCreateNode]
6:26:43 PM:     [repo]/[gatsby-plugin-mdx]/gatsby/on-create-node.js:49:25
6:26:43 PM:   
6:26:43 PM: 
6:26:43 PM: not finished source and transform nodes - 0.987s
6:26:43 PM: ​
6:26:43 PM: ┌─────────────────────────────┐
6:26:43 PM: │   "build.command" failed    │
6:26:43 PM: └─────────────────────────────┘
6:26:43 PM: ​
6:26:43 PM:   Error message
6:26:43 PM:   Command failed with exit code 1: gatsby clean && gatsby build
6:26:43 PM: ​
6:26:43 PM:   Error location
6:26:43 PM:   In Build command from Netlify app:
6:26:43 PM:   gatsby clean && gatsby build
6:26:43 PM: ​
6:26:43 PM:   Resolved config
6:26:43 PM:   build:
6:26:43 PM:     command: gatsby clean && gatsby build
6:26:43 PM:     commandOrigin: ui
6:26:43 PM:     publish: /opt/build/repo/public
6:26:43 PM: Caching artifacts
6:26:43 PM: Started saving node modules
6:26:43 PM: Finished saving node modules
6:26:43 PM: Started saving build plugins
6:26:43 PM: Finished saving build plugins
6:26:43 PM: Started saving yarn cache
6:26:43 PM: Finished saving yarn cache
6:26:43 PM: Started saving pip cache
6:26:43 PM: Finished saving pip cache
6:26:43 PM: Started saving emacs cask dependencies
6:26:43 PM: Finished saving emacs cask dependencies
6:26:43 PM: Started saving maven dependencies
6:26:43 PM: Finished saving maven dependencies
6:26:43 PM: Started saving boot dependencies
6:26:43 PM: Finished saving boot dependencies
6:26:43 PM: Started saving go dependencies
6:26:46 PM: Finished saving go dependencies
6:26:46 PM: Error running command: Build script returned non-zero exit code: 1
6:26:46 PM: Failing build: Failed to build site
6:26:46 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
6:26:46 PM: Finished processing build request in 43.994226644s