{"action":"created","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/4989","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/4989/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/4989/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/4989/events","html_url":"https://github.com/gatsbyjs/gatsby/issues/4989","id":314439947,"number":4989,"title":"Locally builds and runs fine but fails in Netlify","user":{"login":"vickylance","id":5861833,"avatar_url":"https://avatars0.githubusercontent.com/u/5861833?v=4","gravatar_id":"","url":"https://api.github.com/users/vickylance","html_url":"https://github.com/vickylance","followers_url":"https://api.github.com/users/vickylance/followers","following_url":"https://api.github.com/users/vickylance/following{/other_user}","gists_url":"https://api.github.com/users/vickylance/gists{/gist_id}","starred_url":"https://api.github.com/users/vickylance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vickylance/subscriptions","organizations_url":"https://api.github.com/users/vickylance/orgs","repos_url":"https://api.github.com/users/vickylance/repos","events_url":"https://api.github.com/users/vickylance/events{/privacy}","received_events_url":"https://api.github.com/users/vickylance/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-15T18:36:30Z","updated_at":"2018-04-15T20:49:15Z","closed_at":null,"author_association":"NONE","body":"## Description\r\n\r\n`gatsby build` runs fine locally but fails in Netlify.\r\n\r\n### Steps to reproduce\r\n\r\nclone this repo -> `git clone https://github.com/bradtraversy/gatsby_crash_course`\r\ncd into that folder `cd gatsby_crash_course`\r\nrun `npm run build`\r\ncd into public folder `cd public`\r\nrun `http-server -p 3000`\r\ngo to `http://localhost:3000`\r\n\r\nit will work fine but if you deploy that to netlify it fails with an error\r\n\r\n### Expected result\r\n\r\nit should build fine in netlify as it builds in locally\r\n\r\n### Actual result\r\n\r\nIt fails in netlify with \r\n`GraphQLError: Cannot query field \"allMarkdownRemark\" on type \"RootQueryType\".`\r\nerror in netlify\r\n\r\n### Environment\r\n\r\n* Gatsby version (` gatsby@1.9.247`):\r\n* gatsby-cli version (` 1.1.50`):\r\n* Node.js version: v8.9.1\r\n* Operating System: Windows 10\r\n\r\n### File contents (if changed):\r\n\r\n`package.json`: \r\n```\r\n{\r\n  \"name\": \"gatsby-starter-default\",\r\n  \"description\": \"Gatsby default starter\",\r\n  \"version\": \"1.0.0\",\r\n  \"author\": \"Kyle Mathews <mathews.kyle@gmail.com>\",\r\n  \"dependencies\": {\r\n    \"gatsby\": \"^1.9.247\",\r\n    \"gatsby-link\": \"^1.6.40\",\r\n    \"gatsby-plugin-catch-links\": \"^1.0.19\",\r\n    \"gatsby-plugin-react-helmet\": \"^2.0.10\",\r\n    \"gatsby-source-filesystem\": \"^1.5.29\",\r\n    \"gatsby-transformer-remark\": \"^1.7.39\",\r\n    \"react-helmet\": \"^5.2.0\"\r\n  },\r\n  \"keywords\": [\r\n    \"gatsby\"\r\n  ],\r\n  \"license\": \"MIT\",\r\n  \"scripts\": {\r\n    \"build\": \"gatsby build\",\r\n    \"develop\": \"gatsby develop\",\r\n    \"format\": \"prettier --write 'src/**/*.js'\",\r\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"prettier\": \"^1.11.1\"\r\n  }\r\n}\r\n```\r\n`gatsby-node.js`: \r\n```\r\nconst path = require('path')\r\n\r\nexports.createPages = ({ boundActionCreators, graphql }) => {\r\n  const { createPage } = boundActionCreators\r\n\r\n  const postTemplate = path.resolve('src/templates/blog-post.js')\r\n\r\n  return graphql(`\r\n    {\r\n      allMarkdownRemark {\r\n        edges {\r\n          node {\r\n            html\r\n            id\r\n            frontmatter {\r\n              path\r\n              title\r\n              date\r\n              author\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  `).then(res => {\r\n    if (res.errors) {\r\n      return Promise.reject(res.errors)\r\n    }\r\n    res.data.allMarkdownRemark.edges.forEach(({ node }) => {\r\n      createPage({\r\n        path: node.frontmatter.path,\r\n        component: postTemplate,\r\n      })\r\n    })\r\n  })\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments/381436917","html_url":"https://github.com/gatsbyjs/gatsby/issues/4989#issuecomment-381436917","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/4989","id":381436917,"user":{"login":"pieh","id":419821,"avatar_url":"https://avatars1.githubusercontent.com/u/419821?v=4","gravatar_id":"","url":"https://api.github.com/users/pieh","html_url":"https://github.com/pieh","followers_url":"https://api.github.com/users/pieh/followers","following_url":"https://api.github.com/users/pieh/following{/other_user}","gists_url":"https://api.github.com/users/pieh/gists{/gist_id}","starred_url":"https://api.github.com/users/pieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieh/subscriptions","organizations_url":"https://api.github.com/users/pieh/orgs","repos_url":"https://api.github.com/users/pieh/repos","events_url":"https://api.github.com/users/pieh/events{/privacy}","received_events_url":"https://api.github.com/users/pieh/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T20:49:15Z","updated_at":"2018-04-15T20:49:15Z","author_association":"CONTRIBUTOR","body":"It doesn't seem to be same issue as #4990 . \r\n\r\nAre there any other errors or warnings before error you reported? Gist with full output could be helpful"}}
{"actor":{"display_login":"pieh"}}