Gatsby: Locally builds and runs fine but fails in Netlify

Created on 15 Apr 2018  ยท  6Comments  ยท  Source: gatsbyjs/gatsby

Description

gatsby build runs fine locally but fails in Netlify.

Steps to reproduce

clone this repo -> git clone https://github.com/bradtraversy/gatsby_crash_course
cd into that folder cd gatsby_crash_course
run npm run build
cd into public folder cd public
run http-server -p 3000
go to http://localhost:3000

it will work fine but if you deploy that to netlify it fails with an error

Expected result

it should build fine in netlify as it builds in locally

Actual result

It fails in netlify with
GraphQLError: Cannot query field "allMarkdownRemark" on type "RootQueryType".
error in netlify

Environment

  • Gatsby version ([email protected]):
  • gatsby-cli version (1.1.50):
  • Node.js version: v8.9.1
  • Operating System: Windows 10

File contents (if changed):

package.json:

{
  "name": "gatsby-starter-default",
  "description": "Gatsby default starter",
  "version": "1.0.0",
  "author": "Kyle Mathews <[email protected]>",
  "dependencies": {
    "gatsby": "^1.9.247",
    "gatsby-link": "^1.6.40",
    "gatsby-plugin-catch-links": "^1.0.19",
    "gatsby-plugin-react-helmet": "^2.0.10",
    "gatsby-source-filesystem": "^1.5.29",
    "gatsby-transformer-remark": "^1.7.39",
    "react-helmet": "^5.2.0"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write 'src/**/*.js'",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "devDependencies": {
    "prettier": "^1.11.1"
  }
}

gatsby-node.js:

const path = require('path')

exports.createPages = ({ boundActionCreators, graphql }) => {
  const { createPage } = boundActionCreators

  const postTemplate = path.resolve('src/templates/blog-post.js')

  return graphql(`
    {
      allMarkdownRemark {
        edges {
          node {
            html
            id
            frontmatter {
              path
              title
              date
              author
            }
          }
        }
      }
    }
  `).then(res => {
    if (res.errors) {
      return Promise.reject(res.errors)
    }
    res.data.allMarkdownRemark.edges.forEach(({ node }) => {
      createPage({
        path: node.frontmatter.path,
        component: postTemplate,
      })
    })
  })
}
question or discussion

Most helpful comment

@pieh I just updated my package.json to gatsby v1.9.251 and gatsby-source-filesystem to v1.5.32 and uploaded to netlify and I can confirm it is working :)

All 6 comments

I experience similar issues, it seems that gatsby-source-filesystem is broken in 1.5.31 try to set it explicitly to 1.5.30, I created an issue #4990

It doesn't seem to be same issue as #4990 .

Are there any other errors or warnings before error you reported? Gist with full output could be helpful

@noeleont Hi thanks for the suggestion it seems to work once I downgrade and update by package.json to explicitly use v1.5.30 of gatsby-source-filesystem ๐Ÿ‘
@pieh It really seems to be the issue. Check the build logs for v1.5.31 and v1.5.30 below for comparision.

For build v1.5.31

11:55:33 PM: Build ready to start
11:55:35 PM: Fetching cached dependencies
11:55:35 PM: Failed to fetch cache, continuing with build
11:55:35 PM: Starting to prepare the repo for build
11:55:35 PM: No cached dependencies found. Cloning fresh repo
11:55:35 PM: git clone [email protected]:vickylance/Codeveryone-website
11:55:36 PM: Preparing Git Reference refs/heads/master
11:55:36 PM: Starting build script
11:55:36 PM: Installing dependencies
11:55:38 PM: Downloading and installing node v8.11.1...
11:55:38 PM: Downloading https://nodejs.org/dist/v8.11.1/node-v8.11.1-linux-x64.tar.xz...
11:55:38 PM: #
11:55:38 PM:                                                                           1.9%
11:55:38 PM: 
#################
11:55:38 PM:                                                         23.8%
11:55:38 PM: 
#####################
11:55:38 PM: ###########################                          66.8%
11:55:38 PM: 
###############################################################
11:55:38 PM: ######### 100.0%
11:55:38 PM: Computing checksum with sha256sum
11:55:38 PM: Checksums matched!
11:55:41 PM: Now using node v8.11.1 (npm v5.6.0)
11:55:41 PM: Attempting ruby version 2.3.6, read from environment
11:55:42 PM: Using ruby version 2.3.6
11:55:43 PM: Using PHP version 5.6
11:55:43 PM: Started restoring cached node modules
11:55:43 PM: Finished restoring cached node modules
11:55:43 PM: Started restoring cached yarn cache
11:55:43 PM: Finished restoring cached yarn cache
11:55:43 PM: Installing yarn at version 1.3.2
11:55:43 PM: Installing Yarn!
11:55:43 PM: > Downloading tarball...
11:55:43 PM: [1/2]: https://yarnpkg.com/downloads/1.3.2/yarn-v1.3.2.tar.gz --> /tmp/yarn.tar.gz.CUTesph8rZ
11:55:43 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
11:55:43 PM:                                  Dload  Upload   Total   Spent    Left  Speed
11:55:43 PM: 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
11:55:43 PM: 
100    91  100    91    0     0   1043      0 --:--:-- --:--:-- --:--:--  1034
100    91  100    91    0     0   1041      0 --:--:-- --:--:-- --:--:--  1034
11:55:43 PM: 0
11:55:43 PM:      0    0   608    0     0   2165      0 --:--:-- --:--:-- --:--:--  2165
11:55:44 PM: 
100  865k  100  865k
11:55:44 PM:  0     0   888k      0 --:--:-- --:--:-- --:--:--  888k
11:55:44 PM: [2/2]: https://yarnpkg.com/downloads/1.3.2/yarn-v1.3.2.tar.gz.asc --> /tmp/yarn.tar.gz.CUTesph8rZ.asc
11:55:44 PM: 
100    95  100    95    0     0   1888      0 --:--:-- --:--:-- --:--:--  1888
11:55:44 PM: 
  0     0    0
11:55:44 PM:     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0   612    0     0   4088      0 --:--:-- --:--:-- --:--:--  597k
11:55:44 PM: 
100  1027  100  1027
11:55:44 PM:    0     0   5177      0 --:--:-- --:--:-- --:--:--  5177
11:55:44 PM: > Verifying integrity...
11:55:44 PM: gpg: Signature made Thu 02 Nov 2017 04:44:10 PM UTC using RSA key ID FD2497F5
11:55:44 PM: gpg: Good signature from "Yarn Packaging <[email protected]>"
11:55:44 PM: gpg: WARNING: This key is not certified with a trusted signature!
11:55:44 PM: gpg:          There is no indication that the signature belongs to the owner.
11:55:44 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
11:55:44 PM:      Subkey fingerprint: 6A01 0C51 6600 6599 AA17  F081 46C2 130D FD24 97F5
11:55:44 PM: > GPG signature looks good
11:55:44 PM: > Extracting to ~/.yarn...
11:55:44 PM: > Adding to $PATH...
11:55:44 PM: > We've added the following to your /opt/buildhome/.profile
11:55:44 PM: > If this isn't the profile of your current shell then please add the following to your correct profile:
11:55:44 PM: export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
11:55:44 PM: 
11:55:45 PM: > Successfully installed Yarn 1.3.2! Please open another terminal where the `yarn` command will now be available.
11:55:45 PM: Installing NPM modules using Yarn version 1.3.2
11:55:46 PM: yarn install v1.3.2
11:55:46 PM: [1/4] Resolving packages...
11:55:50 PM: [2/4] Fetching packages...
11:56:08 PM: info [email protected]: The platform "linux" is incompatible with this module.
11:56:08 PM: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
11:56:08 PM: [3/4] Linking dependencies...
11:56:08 PM: warning "gatsby > [email protected]" has incorrect peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
11:56:08 PM: warning "gatsby > [email protected]" has unmet peer dependency "caniuse-db@^1.0.30000652".
11:56:08 PM: warning "gatsby-plugin-typography > [email protected]" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
11:56:08 PM: warning "gatsby-remark-katex > [email protected]" has unmet peer dependency "remark-parse@^3.0.0 || ^4.0.0".
11:56:08 PM: warning "gatsby-transformer-remark > [email protected]" has unmet peer dependency "graphql@>=0.4.0".
11:56:08 PM: warning " > [email protected]" has unmet peer dependency "react@>=15.0.0".
11:56:08 PM: warning "react-helmet > [email protected]" has unmet peer dependency "react@^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0".
11:56:08 PM: warning " > [email protected]" has unmet peer dependency "react@>= 0.14.0 < 17.0.0-0".
11:56:08 PM: warning " > [email protected]" has unmet peer dependency "eslint@^4.9.0".
11:56:08 PM: warning "eslint-config-airbnb > [email protected]" has unmet peer dependency "eslint@^4.9.0".
11:56:08 PM: warning " > [email protected]" has unmet peer dependency "[email protected] - 4.x".
11:56:08 PM: warning " > [email protected]" has unmet peer dependency "eslint@^3 || ^4".
11:56:08 PM: warning " > [email protected]" has unmet peer dependency "eslint@^3.0.0 || ^4.0.0".
11:56:16 PM: [4/4] Building fresh packages...
11:56:36 PM: success Saved lockfile.
11:56:36 PM: Done in 49.88s.
11:56:36 PM: NPM modules installed using Yarn
11:56:36 PM: Started restoring cached go cache
11:56:36 PM: Finished restoring cached go cache
11:56:36 PM: unset GOOS;
11:56:36 PM: unset GOARCH;
11:56:36 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
11:56:36 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
11:56:36 PM: go version >&2;
11:56:36 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
11:56:36 PM: go version go1.10 linux/amd64
11:56:36 PM: Installing missing commands
11:56:36 PM: Verify run directory
11:56:36 PM: Executing user command: npm run build
11:56:37 PM: > [email protected] build /opt/build/repo
11:56:37 PM: > gatsby build
11:56:38 PM: success delete html and css files from previous builds โ€” 0.051 s
11:56:39 PM: success open and validate gatsby-config.js โ€” 0.009 s
11:56:39 PM: success copy gatsby files โ€” 0.032 s
11:56:39 PM: success onPreBootstrap โ€” 0.552 s
11:56:39 PM: The new node didn't pass validation
11:56:40 PM: ValidationError: child "internal" fails because ["description" is not allowed]
11:56:40 PM: { id: '/opt/build/repo/src/pages/blogs absPath of file',
11:56:40 PM:   children: [],
11:56:40 PM:   parent: '___SOURCE___',
11:56:40 PM:   internal:
11:56:40 PM:    { contentDigest: '7a6f67123432c4ccb90e9632569e8d32',
11:56:40 PM:      type: 'Directory',
11:56:40 PM:      description: 'Directory "src/pages/blogs"',
11:56:40 PM:      owner: 'gatsby-source-filesystem' },
11:56:40 PM:   sourceInstanceName: 'pages',
11:56:40 PM:   absolutePath: '/opt/build/repo/src/pages/blogs',
11:56:40 PM:   relativePath: '',
11:56:40 PM:   extension: '',
11:56:40 PM:   size: 4096,
11:56:40 PM:   prettySize: '4.1 kB',
11:56:40 PM:   modifiedTime: '2018-04-15T18:25:36.399Z',
11:56:40 PM:   accessTime: '2018-04-15T18:26:39.974Z',
11:56:40 PM:   changeTime: '2018-04-15T18:25:36.911Z',
11:56:40 PM:   birthTime: '2018-04-15T18:25:36.911Z',
11:56:40 PM:   root: '/',
11:56:40 PM:   dir: '/opt/build/repo/src/pages',
11:56:40 PM:   base: 'blogs',
11:56:40 PM:   ext: '',
11:56:40 PM:   name: 'blogs',
11:56:40 PM:   relativeDirectory: '..',
11:56:40 PM:   dev: 2064,
11:56:40 PM:   mode: 16877,
11:56:40 PM:   nlink: 5,
11:56:40 PM:   uid: 2500,
11:56:40 PM:   gid: 0,
11:56:40 PM:   rdev: 0,
11:56:40 PM:   blksize: 4096,
11:56:40 PM:   ino: 19267661,
11:56:40 PM:   blocks: 8,
11:56:40 PM:   atimeMs: 1523816799973.618,
11:56:40 PM:   mtimeMs: 1523816736398.6387,
11:56:40 PM:   ctimeMs: 1523816736910.6384,
11:56:40 PM:   birthtimeMs: 1523816736910.6384,
11:56:40 PM:   atime: '2018-04-15T18:26:39.974Z',
11:56:40 PM:   mtime: '2018-04-15T18:25:36.399Z',
11:56:40 PM:   ctime: '2018-04-15T18:25:36.911Z',
11:56:40 PM:   birthtime: '2018-04-15T18:25:36.911Z' }
11:56:40 PM: The new node didn't pass validation
11:56:40 PM: ValidationError: child "internal" fails because ["description" is not allowed]
11:56:40 PM: { id: '/opt/build/repo/src/pages/blogs/2018-04-15 absPath of file',
11:56:40 PM:   children: [],
11:56:40 PM:   parent: '___SOURCE___',
11:56:40 PM:   internal:
11:56:40 PM:    { contentDigest: '4519d3105c28cb45d0c370e1a6ab47f8',
11:56:40 PM:      type: 'Directory',
11:56:40 PM:      description: 'Directory "src/pages/blogs/2018-04-15"',
11:56:40 PM:      owner: 'gatsby-source-filesystem' },
11:56:40 PM:   sourceInstanceName: 'pages',
11:56:40 PM:   absolutePath: '/opt/build/repo/src/pages/blogs/2018-04-15',
11:56:40 PM:   relativePath: '2018-04-15',
11:56:40 PM:   extension: '',
11:56:40 PM:   size: 4096,
11:56:40 PM:   prettySize: '4.1 kB',
11:56:40 PM:   modifiedTime: '2018-04-15T18:25:36.399Z',
11:56:40 PM:   accessTime: '2018-04-15T18:26:39.979Z',
11:56:40 PM:   changeTime: '2018-04-15T18:25:36.911Z',
11:56:40 PM:   birthTime: '2018-04-15T18:25:36.911Z',
11:56:40 PM:   root: '/',
11:56:40 PM:   dir: '/opt/build/repo/src/pages/blogs',
11:56:40 PM:   base: '2018-04-15',
11:56:40 PM:   ext: '',
11:56:41 PM:   name: '2018-04-15',
11:56:41 PM:   relativeDirectory: '',
11:56:41 PM:   dev: 2064,
11:56:41 PM:   mode: 16877,
11:56:41 PM:   nlink: 2,
11:56:41 PM:   uid: 2500,
11:56:41 PM:   gid: 0,
11:56:41 PM:   rdev: 0,
11:56:41 PM:   blksize: 4096,
11:56:41 PM:   ino: 19267662,
11:56:41 PM:   blocks: 8,
11:56:41 PM:   atimeMs: 1523816799978.618,
11:56:41 PM:   mtimeMs: 1523816736398.6387,
11:56:41 PM:   ctimeMs: 1523816736910.6384,
11:56:41 PM:   birthtimeMs: 1523816736910.6384,
11:56:41 PM:   atime: '2018-04-15T18:26:39.979Z',
11:56:41 PM:   mtime: '2018-04-15T18:25:36.399Z',
11:56:41 PM:   ctime: '2018-04-15T18:25:36.911Z',
11:56:41 PM:   birthtime: '2018-04-15T18:25:36.911Z' }
11:56:41 PM: The new node didn't pass validation
11:56:41 PM: ValidationError: child "internal" fails because ["description" is not allowed]
11:56:41 PM: { id: '/opt/build/repo/src/pages/blogs/2018-04-16 absPath of file',
11:56:41 PM:   children: [],
11:56:41 PM:   parent: '___SOURCE___',
11:56:41 PM:   internal:
11:56:41 PM:    { contentDigest: 'db6065865671846050071804af5f508f',
11:56:41 PM:      type: 'Directory',
11:56:41 PM:      description: 'Directory "src/pages/blogs/2018-04-16"',
11:56:41 PM:      owner: 'gatsby-source-filesystem' },
11:56:41 PM:   sourceInstanceName: 'pages',
11:56:41 PM:   absolutePath: '/opt/build/repo/src/pages/blogs/2018-04-16',
11:56:41 PM:   relativePath: '2018-04-16',
11:56:41 PM:   extension: '',
11:56:41 PM:   size: 4096,
11:56:41 PM:   prettySize: '4.1 kB',
11:56:41 PM:   modifiedTime: '2018-04-15T18:25:36.399Z',
11:56:41 PM:   accessTime: '2018-04-15T18:26:39.980Z',
11:56:41 PM:   changeTime: '2018-04-15T18:25:36.911Z',
11:56:41 PM:   birthTime: '2018-04-15T18:25:36.911Z',
11:56:42 PM:   root: '/',
11:56:42 PM:   dir: '/opt/build/repo/src/pages/blogs',
11:56:42 PM:   base: '2018-04-16',
11:56:42 PM:   ext: '',
11:56:42 PM:   name: '2018-04-16',
11:56:42 PM:   relativeDirectory: '',
11:56:42 PM:   dev: 2064,
11:56:42 PM:   mode: 16877,
11:56:42 PM:   nlink: 2,
11:56:42 PM:   uid: 2500,
11:56:42 PM:   gid: 0,
11:56:42 PM:   rdev: 0,
11:56:42 PM:   blksize: 4096,
11:56:42 PM:   ino: 19267664,
11:56:42 PM:   blocks: 8,
11:56:42 PM:   atimeMs: 1523816799979.618,
11:56:42 PM:   mtimeMs: 1523816736398.6387,
11:56:42 PM:   ctimeMs: 1523816736910.6384,
11:56:42 PM:   birthtimeMs: 1523816736910.6384,
11:56:42 PM:   atime: '2018-04-15T18:26:39.980Z',
11:56:42 PM:   mtime: '2018-04-15T18:25:36.399Z',
11:56:42 PM:   ctime: '2018-04-15T18:25:36.911Z',
11:56:42 PM:   birthtime: '2018-04-15T18:25:36.911Z' }
11:56:42 PM: The new node didn't pass validation
11:56:42 PM: ValidationError: child "internal" fails because ["description" is not allowed]
11:56:42 PM: { id: '/opt/build/repo/src/pages/blogs/2018-04-17 absPath of file',
11:56:42 PM:   children: [],
11:56:42 PM:   parent: '___SOURCE___',
11:56:42 PM:   internal:
11:56:42 PM:    { contentDigest: 'c1e716b360feda51cd541ee8a610f4fa',
11:56:42 PM:      type: 'Directory',
11:56:42 PM:      description: 'Directory "src/pages/blogs/2018-04-17"',
11:56:42 PM:      owner: 'gatsby-source-filesystem' },
11:56:42 PM:   sourceInstanceName: 'pages',
11:56:42 PM:   absolutePath: '/opt/build/repo/src/pages/blogs/2018-04-17',
11:56:42 PM:   relativePath: '2018-04-17',
11:56:42 PM:   extension: '',
11:56:42 PM:   size: 4096,
11:56:42 PM:   prettySize: '4.1 kB',
11:56:42 PM:   modifiedTime: '2018-04-15T18:25:36.399Z',
11:56:42 PM:   accessTime: '2018-04-15T18:26:39.980Z',
11:56:42 PM:   changeTime: '2018-04-15T18:25:36.911Z',
11:56:42 PM:   birthTime: '2018-04-15T18:25:36.911Z',
11:56:42 PM:   root: '/',
11:56:42 PM:   dir: '/opt/build/repo/src/pages/blogs',
11:56:42 PM:   base: '2018-04-17',
11:56:42 PM:   ext: '',
11:56:42 PM:   name: '2018-04-17',
11:56:42 PM:   relativeDirectory: '',
11:56:42 PM:   dev: 2064,
11:56:42 PM:   mode: 16877,
11:56:42 PM:   nlink: 2,
11:56:42 PM:   uid: 2500,
11:56:42 PM:   gid: 0,
11:56:42 PM:   rdev: 0,
11:56:42 PM:   blksize: 4096,
11:56:42 PM:   ino: 19267666,
11:56:42 PM:   blocks: 8,
11:56:42 PM:   atimeMs: 1523816799979.618,
11:56:42 PM:   mtimeMs: 1523816736398.6387,
11:56:42 PM:   ctimeMs: 1523816736910.6384,
11:56:42 PM:   birthtimeMs: 1523816736910.6384,
11:56:42 PM:   atime: '2018-04-15T18:26:39.980Z',
11:56:42 PM:   mtime: '2018-04-15T18:25:36.399Z',
11:56:42 PM:   ctime: '2018-04-15T18:25:36.911Z',
11:56:42 PM:   birthtime: '2018-04-15T18:25:36.911Z' }
11:56:42 PM: The new node didn't pass validation
11:56:43 PM: ValidationError: child "internal" fails because ["description" is not allowed]
11:56:43 PM: { id: '/opt/build/repo/src/pages/blogs/2018-04-15/index.md absPath of file',
11:56:43 PM:   children: [],
11:56:43 PM:   parent: '___SOURCE___',
11:56:43 PM:   internal:
11:56:43 PM:    { contentDigest: '439563211a62848c681d1bec9125629c',
11:56:43 PM:      mediaType: 'text/markdown',
11:56:43 PM:      type: 'File',
11:56:43 PM:      description: 'File "src/pages/blogs/2018-04-15/index.md"',
11:56:43 PM:      owner: 'gatsby-source-filesystem' },
11:56:43 PM:   sourceInstanceName: 'pages',
11:56:43 PM:   absolutePath: '/opt/build/repo/src/pages/blogs/2018-04-15/index.md',
11:56:43 PM:   relativePath: '2018-04-15/index.md',
11:56:43 PM:   extension: 'md',
11:56:43 PM:   size: 136,
11:56:43 PM:   prettySize: '136 B',
11:56:43 PM:   modifiedTime: '2018-04-15T18:25:36.399Z',
11:56:43 PM:   accessTime: '2018-04-15T18:25:36.865Z',
11:56:43 PM:   changeTime: '2018-04-15T18:25:36.911Z',
11:56:43 PM:   birthTime: '2018-04-15T18:25:36.911Z',
11:56:43 PM:   root: '/',
11:56:43 PM:   dir: '/opt/build/repo/src/pages/blogs/2018-04-15',
11:56:43 PM:   base: 'index.md',
11:56:43 PM:   ext: '.md',
11:56:43 PM:   name: 'index',
11:56:43 PM:   relativeDirectory: '2018-04-15',
11:56:43 PM:   dev: 2064,
11:56:43 PM:   mode: 33188,
11:56:43 PM:   nlink: 1,
11:56:43 PM:   uid: 2500,
11:56:43 PM:   gid: 0,
11:56:43 PM:   rdev: 0,
11:56:43 PM:   blksize: 4096,
11:56:43 PM:   ino: 19267663,
11:56:43 PM:   blocks: 8,
11:56:43 PM:   atimeMs: 1523816736864.6387,
11:56:43 PM:   mtimeMs: 1523816736398.6387,
11:56:43 PM:   ctimeMs: 1523816736910.6384,
11:56:43 PM:   birthtimeMs: 1523816736910.6384,
11:56:43 PM:   atime: '2018-04-15T18:25:36.865Z',
11:56:43 PM:   mtime: '2018-04-15T18:25:36.399Z',
11:56:43 PM:   ctime: '2018-04-15T18:25:36.911Z',
11:56:43 PM:   birthtime: '2018-04-15T18:25:36.911Z' }
11:56:43 PM: The new node didn't pass validation
11:56:43 PM: ValidationError: child "internal" fails because ["description" is not allowed]
11:56:43 PM: { id: '/opt/build/repo/src/pages/blogs/2018-04-16/index.md absPath of file',
11:56:43 PM:   children: [],
11:56:43 PM:   parent: '___SOURCE___',
11:56:43 PM:   internal:
11:56:43 PM:    { contentDigest: '42f348428ecc4b0f83fdb372adececac',
11:56:43 PM:      mediaType: 'text/markdown',
11:56:43 PM:      type: 'File',
11:56:43 PM:      description: 'File "src/pages/blogs/2018-04-16/index.md"',
11:56:43 PM:      owner: 'gatsby-source-filesystem' },
11:56:43 PM:   sourceInstanceName: 'pages',
11:56:43 PM:   absolutePath: '/opt/build/repo/src/pages/blogs/2018-04-16/index.md',
11:56:43 PM:   relativePath: '2018-04-16/index.md',
11:56:43 PM:   extension: 'md',
11:56:43 PM:   size: 128,
11:56:43 PM:   prettySize: '128 B',
11:56:43 PM:   modifiedTime: '2018-04-15T18:25:36.399Z',
11:56:43 PM:   accessTime: '2018-04-15T18:25:36.865Z',
11:56:43 PM:   changeTime: '2018-04-15T18:25:36.911Z',
11:56:43 PM:   birthTime: '2018-04-15T18:25:36.911Z',
11:56:43 PM:   root: '/',
11:56:43 PM:   dir: '/opt/build/repo/src/pages/blogs/2018-04-16',
11:56:43 PM:   base: 'index.md',
11:56:43 PM:   ext: '.md',
11:56:44 PM:   name: 'index',
11:56:44 PM:   relativeDirectory: '2018-04-16',
11:56:44 PM:   dev: 2064,
11:56:44 PM:   mode: 33188,
11:56:44 PM:   nlink: 1,
11:56:44 PM:   uid: 2500,
11:56:44 PM:   gid: 0,
11:56:44 PM:   rdev: 0,
11:56:44 PM:   blksize: 4096,
11:56:44 PM:   ino: 19267665,
11:56:44 PM:   blocks: 8,
11:56:44 PM:   atimeMs: 1523816736864.6387,
11:56:44 PM:   mtimeMs: 1523816736398.6387,
11:56:44 PM:   ctimeMs: 1523816736910.6384,
11:56:44 PM:   birthtimeMs: 1523816736910.6384,
11:56:44 PM:   atime: '2018-04-15T18:25:36.865Z',
11:56:44 PM:   mtime: '2018-04-15T18:25:36.399Z',
11:56:44 PM:   ctime: '2018-04-15T18:25:36.911Z',
11:56:44 PM:   birthtime: '2018-04-15T18:25:36.911Z' }
11:56:44 PM: The new node didn't pass validation
11:56:44 PM: ValidationError: child "internal" fails because ["description" is not allowed]
11:56:44 PM: { id: '/opt/build/repo/src/pages/blogs/2018-04-17/index.md absPath of file',
11:56:44 PM:   children: [],
11:56:44 PM:   parent: '___SOURCE___',
11:56:44 PM:   internal:
11:56:44 PM:    { contentDigest: 'f37eb853eb5f74ff656837a38f6ea46a',
11:56:44 PM:      mediaType: 'text/markdown',
11:56:44 PM:      type: 'File',
11:56:44 PM:      description: 'File "src/pages/blogs/2018-04-17/index.md"',
11:56:44 PM:      owner: 'gatsby-source-filesystem' },
11:56:44 PM:   sourceInstanceName: 'pages',
11:56:44 PM:   absolutePath: '/opt/build/repo/src/pages/blogs/2018-04-17/index.md',
11:56:44 PM:   relativePath: '2018-04-17/index.md',
11:56:44 PM:   extension: 'md',
11:56:44 PM:   size: 128,
11:56:44 PM:   prettySize: '128 B',
11:56:44 PM:   modifiedTime: '2018-04-15T18:25:36.399Z',
11:56:44 PM:   accessTime: '2018-04-15T18:25:36.865Z',
11:56:44 PM:   changeTime: '2018-04-15T18:25:36.911Z',
11:56:44 PM:   birthTime: '2018-04-15T18:25:36.911Z',
11:56:44 PM:   root: '/',
11:56:44 PM:   dir: '/opt/build/repo/src/pages/blogs/2018-04-17',
11:56:44 PM:   base: 'index.md',
11:56:44 PM:   ext: '.md',
11:56:44 PM:   name: 'index',
11:56:44 PM:   relativeDirectory: '2018-04-17',
11:56:44 PM:   dev: 2064,
11:56:44 PM:   mode: 33188,
11:56:44 PM:   nlink: 1,
11:56:44 PM:   uid: 2500,
11:56:44 PM:   gid: 0,
11:56:44 PM:   rdev: 0,
11:56:44 PM:   blksize: 4096,
11:56:44 PM:   ino: 19267667,
11:56:44 PM:   blocks: 8,
11:56:44 PM:   atimeMs: 1523816736864.6387,
11:56:44 PM:   mtimeMs: 1523816736398.6387,
11:56:44 PM:   ctimeMs: 1523816736910.6384,
11:56:44 PM:   birthtimeMs: 1523816736910.6384,
11:56:44 PM:   atime: '2018-04-15T18:25:36.865Z',
11:56:44 PM:   mtime: '2018-04-15T18:25:36.399Z',
11:56:44 PM:   ctime: '2018-04-15T18:25:36.911Z',
11:56:44 PM:   birthtime: '2018-04-15T18:25:36.911Z' }
11:56:44 PM: warning The gatsby-source-filesystem plugin has generated no Gatsby nodes. Do you need it?
11:56:44 PM: success source and transform nodes โ€” 0.109 s
11:56:45 PM: success building schema โ€” 0.179 s
11:56:45 PM: success createLayouts โ€” 0.015 s
11:56:45 PM: error gatsby-node.js returned an error
11:56:45 PM: 
11:56:45 PM:   GraphQLError: Cannot query field "allMarkdownRemark" on type "RootQueryType".
11:56:45 PM:   
11:56:45 PM:   - es6-promise.js:458 initializePromise
11:56:45 PM:     [repo]/[es6-promise]/dist/es6-promise.js:458:5
11:56:45 PM:   
11:56:45 PM:   - es6-promise.js:874 new Promise
11:56:45 PM:     [repo]/[es6-promise]/dist/es6-promise.js:874:33
11:56:45 PM:   
11:56:45 PM:   - index.js:368 graphqlRunner
11:56:45 PM:     [repo]/[gatsby]/dist/bootstrap/index.js:368:22
11:56:45 PM:   
11:56:45 PM:   - gatsby-node.js:8 Object.exports.createPages
11:56:45 PM:     /opt/build/repo/gatsby-node.js:8:10
11:56:45 PM:   
11:56:45 PM:   - api-runner-node.js:110 runAPI
11:56:45 PM:     [repo]/[gatsby]/dist/utils/api-runner-node.js:110:36
11:56:45 PM:   
11:56:45 PM:   - api-runner-node.js:187 
11:56:45 PM:     [repo]/[gatsby]/dist/utils/api-runner-node.js:187:33
11:56:45 PM:   
11:56:45 PM:   - map.js:27 
11:56:45 PM:     [repo]/[gatsby]/[async]/internal/map.js:27:9
11:56:45 PM:   
11:56:45 PM: 
11:56:45 PM: npm ERR! code ELIFECYCLE
11:56:45 PM: npm ERR! errno 1
11:56:45 PM: npm ERR! [email protected] build: `gatsby build`
11:56:45 PM: npm ERR! Exit status 1
11:56:45 PM: npm ERR!
11:56:45 PM: npm ERR! Failed at the [email protected] build script.
11:56:45 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:56:45 PM: npm ERR! A complete log of this run can be found in:
11:56:45 PM: npm ERR!     /opt/buildhome/.npm/_logs/2018-04-15T18_26_40_288Z-debug.log
11:56:45 PM: Caching artifacts
11:56:45 PM: Started saving node modules
11:56:45 PM: Finished saving node modules
11:56:45 PM: Started saving yarn cache
11:56:45 PM: Finished saving yarn cache
11:56:45 PM: Started saving pip cache
11:56:45 PM: Finished saving pip cache
11:56:45 PM: Started saving emacs cask dependencies
11:56:45 PM: Finished saving emacs cask dependencies
11:56:45 PM: Started saving maven dependencies
11:56:45 PM: Finished saving maven dependencies
11:56:45 PM: Started saving boot dependencies
11:56:45 PM: Finished saving boot dependencies
11:56:45 PM: Started saving go dependencies
11:56:45 PM: Finished saving go dependencies
11:56:45 PM: Cached node version v8.11.1
11:56:45 PM: Error running command: Build script returned non-zero exit code: 1
11:56:45 PM: Failing build: Failed to build site
11:56:45 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
11:56:46 PM: Finished processing build request in 1m11.720384534s

For build v1.5.30

12:48:47 AM: Build ready to start
12:48:49 AM: Fetching cached dependencies
12:48:49 AM: Failed to fetch cache, continuing with build
12:48:49 AM: Starting to prepare the repo for build
12:48:50 AM: No cached dependencies found. Cloning fresh repo
12:48:50 AM: git clone [email protected]:vickylance/Codeveryone-website
12:48:50 AM: Preparing Git Reference refs/heads/master
12:48:51 AM: Starting build script
12:48:51 AM: Installing dependencies
12:48:52 AM: Downloading and installing node v8.11.1...
12:48:52 AM: Downloading https://nodejs.org/dist/v8.11.1/node-v8.11.1-linux-x64.tar.xz...
12:48:52 AM: 
##
12:48:52 AM:                                                               4.0%
12:48:52 AM: 
##################
12:48:52 AM: #######                                                 35.3%
12:48:52 AM: 
#######################
12:48:53 AM: ##################################                 79.5%
12:48:53 AM: 
#############
12:48:53 AM: ########################################################### 100.0%
12:48:53 AM: Computing checksum with sha256sum
12:48:53 AM: Checksums matched!
12:48:55 AM: Now using node v8.11.1 (npm v5.6.0)
12:48:56 AM: Attempting ruby version 2.3.6, read from environment
12:48:57 AM: Using ruby version 2.3.6
12:48:57 AM: Using PHP version 5.6
12:48:57 AM: Started restoring cached node modules
12:48:57 AM: Finished restoring cached node modules
12:48:57 AM: Started restoring cached yarn cache
12:48:57 AM: Finished restoring cached yarn cache
12:48:57 AM: Installing yarn at version 1.3.2
12:48:57 AM: Installing Yarn!
12:48:57 AM: > Downloading tarball...
12:48:57 AM: [1/2]: https://yarnpkg.com/downloads/1.3.2/yarn-v1.3.2.tar.gz --> /tmp/yarn.tar.gz.tYNlNOjiA8
12:48:57 AM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
12:48:57 AM:                                  Dload  Upload   Total   Spent    Left  Speed
12:48:57 AM: 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
12:48:57 AM: 
100    91  100    91    0     0   1386      0 --:--:-- --:--:-- --:--:--  1400
12:48:57 AM: 0
12:48:57 AM:      0    0   608    0     0   2221      0 --:--:-- --:--:-- --:--:--  2221
12:48:58 AM: 
  1  865k    1 16360    0
12:48:58 AM:  0  32767      0  0:00:27 --:--:--  0:00:27 32767
12:48:58 AM: 
100  865k  100  865k    0     0
12:48:58 AM: 906k      0 --:--:-- --:--:-- --:--:-- 1863k
12:48:58 AM: [2/2]: https://yarnpkg.com/downloads/1.3.2/yarn-v1.3.2.tar.gz.asc --> /tmp/yarn.tar.gz.tYNlNOjiA8.asc
12:48:58 AM: 
100    95  100    95    0     0   2630      0 --:--:-- --:--:-- --:--:--  2630
12:48:58 AM: 
  0     0    0   612
12:48:58 AM:  0     0   4463      0 --:--:-- --:--:-- --:--:--  4463
12:48:58 AM: 
100  1027  100  1027    0
12:48:58 AM:      0   3995      0 --:--:-- --:--:-- --:--:--  3995
12:48:58 AM: > Verifying integrity...
12:48:58 AM: gpg: Signature made Thu 02 Nov 2017 04:44:10 PM UTC using RSA key ID FD2497F5
12:48:58 AM: gpg: Good signature from "Yarn Packaging <[email protected]>"
12:48:58 AM: gpg: WARNING: This key is not certified with a trusted signature!
12:48:58 AM: gpg:          There is no indication that the signature belongs to the owner.
12:48:58 AM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
12:48:58 AM:      Subkey fingerprint: 6A01 0C51 6600 6599 AA17  F081 46C2 130D FD24 97F5
12:48:58 AM: > GPG signature looks good
12:48:58 AM: > Extracting to ~/.yarn...
12:48:58 AM: > Adding to $PATH...
12:48:58 AM: > We've added the following to your /opt/buildhome/.profile
12:48:58 AM: > If this isn't the profile of your current shell then please add the following to your correct profile:
12:48:58 AM: export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
12:48:58 AM: 
12:48:59 AM: > Successfully installed Yarn 1.3.2! Please open another terminal where the `yarn` command will now be available.
12:48:59 AM: Installing NPM modules using Yarn version 1.3.2
12:49:00 AM: yarn install v1.3.2
12:49:00 AM: [1/4] Resolving packages...
12:49:04 AM: [2/4] Fetching packages...
12:49:22 AM: info [email protected]: The platform "linux" is incompatible with this module.
12:49:22 AM: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
12:49:22 AM: [3/4] Linking dependencies...
12:49:22 AM: warning "gatsby > [email protected]" has incorrect peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
12:49:22 AM: warning "gatsby > [email protected]" has unmet peer dependency "caniuse-db@^1.0.30000652".
12:49:22 AM: warning "gatsby-plugin-typography > [email protected]" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
12:49:22 AM: warning "gatsby-remark-katex > [email protected]" has unmet peer dependency "remark-parse@^3.0.0 || ^4.0.0".
12:49:22 AM: warning "gatsby-transformer-remark > [email protected]" has unmet peer dependency "graphql@>=0.4.0".
12:49:22 AM: warning " > [email protected]" has unmet peer dependency "react@>=15.0.0".
12:49:22 AM: warning "react-helmet > [email protected]" has unmet peer dependency "react@^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0".
12:49:22 AM: warning " > [email protected]" has unmet peer dependency "react@>= 0.14.0 < 17.0.0-0".
12:49:22 AM: warning " > [email protected]" has unmet peer dependency "eslint@^4.9.0".
12:49:22 AM: warning "eslint-config-airbnb > [email protected]" has unmet peer dependency "eslint@^4.9.0".
12:49:22 AM: warning " > [email protected]" has unmet peer dependency "[email protected] - 4.x".
12:49:22 AM: warning " > [email protected]" has unmet peer dependency "eslint@^3 || ^4".
12:49:22 AM: warning " > [email protected]" has unmet peer dependency "eslint@^3.0.0 || ^4.0.0".
12:49:30 AM: [4/4] Building fresh packages...
12:49:48 AM: success Saved lockfile.
12:49:48 AM: Done in 48.59s.
12:49:48 AM: NPM modules installed using Yarn
12:49:49 AM: Started restoring cached go cache
12:49:49 AM: Finished restoring cached go cache
12:49:49 AM: unset GOOS;
12:49:49 AM: unset GOARCH;
12:49:49 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
12:49:49 AM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
12:49:49 AM: go version >&2;
12:49:49 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
12:49:49 AM: go version go1.10 linux/amd64
12:49:49 AM: Installing missing commands
12:49:49 AM: Verify run directory
12:49:49 AM: Executing user command: npm run build
12:49:49 AM: > [email protected] build /opt/build/repo
12:49:49 AM: > gatsby build
12:49:51 AM: success delete html and css files from previous builds โ€” 0.045 s
12:49:51 AM: success open and validate gatsby-config.js โ€” 0.005 s
12:49:51 AM: success copy gatsby files โ€” 0.035 s
12:49:52 AM: success onPreBootstrap โ€” 0.407 s
12:49:52 AM: success source and transform nodes โ€” 0.101 s
12:49:52 AM: success building schema โ€” 0.229 s
12:49:52 AM: success createLayouts โ€” 0.011 s
12:49:52 AM: success createPages โ€” 0.046 s
12:49:52 AM: success createPagesStatefully โ€” 0.028 s
12:49:52 AM: success onPreExtractQueries โ€” 0.001 s
12:49:52 AM: success update schema โ€” 0.155 s
12:49:52 AM: success extract queries from components โ€” 0.057 s
12:49:52 AM: success run graphql queries โ€” 0.029 s
12:49:52 AM: success write out page data โ€” 0.004 s
12:49:52 AM: success write out redirect data โ€” 0.001 s
12:49:52 AM: success onPostBootstrap โ€” 0.001 s
12:49:52 AM: info bootstrap finished - 2.98 s
12:49:58 AM: success Building CSS โ€” 5.312 s
12:50:06 AM: success Building production JavaScript bundles โ€” 8.302 s
12:50:09 AM: success Building static HTML for pages โ€” 3.140 s
12:50:09 AM: Total precache size is about 309 kB for 5 resources.
12:50:09 AM: info Done building in 19.754 sec
12:50:09 AM: Caching artifacts
12:50:09 AM: Started saving node modules
12:50:09 AM: Finished saving node modules
12:50:09 AM: Started saving yarn cache
12:50:09 AM: Finished saving yarn cache
12:50:09 AM: Started saving pip cache
12:50:09 AM: Finished saving pip cache
12:50:09 AM: Started saving emacs cask dependencies
12:50:09 AM: Finished saving emacs cask dependencies
12:50:09 AM: Started saving maven dependencies
12:50:09 AM: Finished saving maven dependencies
12:50:09 AM: Started saving boot dependencies
12:50:09 AM: Finished saving boot dependencies
12:50:09 AM: Started saving go dependencies
12:50:09 AM: Finished saving go dependencies
12:50:10 AM: Cached node version v8.11.1
12:50:10 AM: Build script success
12:50:10 AM: Starting to deploy site from 'public/'
12:50:11 AM: Starting post processing
12:50:11 AM: Post processing done
12:50:11 AM: Site is live
12:50:23 AM: Finished processing build request in 1m34.288271429s

I can close this issue if no further clarification regarding the bug in v1.5.31 of gatsby-source-filesystem is needed. @pieh

Updating gatsby to at least 1.9.250 (and better to 1.9.251) and gatsby-source-filesystem to 1.5.32 should fix the issue. It turned out to be exact same issue as #4990. We can leave this open until you confirm that updating packages fixes the issue.

@pieh I just updated my package.json to gatsby v1.9.251 and gatsby-source-filesystem to v1.5.32 and uploaded to netlify and I can confirm it is working :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benstr picture benstr  ยท  3Comments

andykais picture andykais  ยท  3Comments

brandonmp picture brandonmp  ยท  3Comments

kalinchernev picture kalinchernev  ยท  3Comments

dustinhorton picture dustinhorton  ยท  3Comments