Gatsby: Errors after updating either [email protected] [email protected]

Created on 16 Apr 2018  ยท  4Comments  ยท  Source: gatsbyjs/gatsby

Errors after updating either
[email protected] -> [email protected]
[email protected] -> [email protected]

My project works fine with [email protected] and [email protected]
but trying to update either gatsby or gatsby-source-filesystem throws different errors

With latest gatsby and any version of source-filesystem

//[email protected]
//[email protected] / 1.5.31

success delete html and css files from previous builds โ€” 0.086 s
success open and validate gatsby-config.js โ€” 2.039 s
info One or more of your plugins have changed since the last time you ran Gatsby. As
a precaution, we're deleting your site's cache to ensure there's not any stale
data
success copy gatsby files โ€” 0.094 s
success onPreBootstrap โ€” 1.580 s
success source and transform nodes โ€” 0.287 s
error UNHANDLED REJECTION


  TypeError: Cannot convert a Symbol value to a string

  - TemplateTag.js:122 TemplateTag.processSubstitutions
    [gat]/[common-tags]/lib/TemplateTag/TemplateTag.js:122:26

  - Array.reduce

  - TemplateTag.js:62 TemplateTag.tag
    [gat]/[common-tags]/lib/TemplateTag/TemplateTag.js:62:47

  - infer-graphql-input-fields.js:113 inferGraphQLInputFields
    [gat]/[gatsby]/dist/schema/infer-graphql-input-fields.js:113:37

  - infer-graphql-input-fields.js:267
    [gat]/[gatsby]/dist/schema/infer-graphql-input-fields.js:267:17

  - lodash.js:4917
    [gat]/[lodash]/lodash.js:4917:15

  - lodash.js:3002 baseForOwn
    [gat]/[lodash]/lodash.js:3002:24

  - lodash.js:4886
    [gat]/[lodash]/lodash.js:4886:18

  - lodash.js:9334 Function.forEach
    [gat]/[lodash]/lodash.js:9334:14

  - infer-graphql-input-fields.js:228 inferInputObjectStructureFromNodes
    [gat]/[gatsby]/dist/schema/infer-graphql-input-fields.js:228:5

  - infer-graphql-input-fields.js:149 inferGraphQLInputFields
    [gat]/[gatsby]/dist/schema/infer-graphql-input-fields.js:149:22

  - infer-graphql-input-fields.js:267
    [gat]/[gatsby]/dist/schema/infer-graphql-input-fields.js:267:17

  - lodash.js:4917
    [gat]/[lodash]/lodash.js:4917:15

  - lodash.js:3002 baseForOwn
    [gat]/[lodash]/lodash.js:3002:24

  - lodash.js:4886
    [gat]/[lodash]/lodash.js:4886:18

  - lodash.js:9334 Function.forEach
    [gat]/[lodash]/lodash.js:9334:14


error An unexpected error occurred: "Command failed.
Exit code: 1
Command: C:\\WINDOWS\\system32\\cmd.exe
Arguments: /d /s /c gatsby develop
Directory: D:\\Develop\\gat
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "D:\\Develop\\gat\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

With older gatsby but newer filesystem-source

//gatsby 1.9.249
//gatsby-filesystem-source 1.5.31

ValidationError: child "internal" fails because ["description" is not allowed]
{ id: 'D:/Develop/gat/src/img/infra.jpg absPath of file',
  children: [],
  parent: '___SOURCE___',
  internal:
   { contentDigest: '9925369e106f0c13d82054c911b96b59',
     mediaType: 'image/jpeg',
     type: 'File',
     description: 'File "src\\img\\infra.jpg"',
     owner: 'gatsby-source-filesystem' },
  sourceInstanceName: 'img',
  absolutePath: 'D:/Develop/gat/src/img/infra.jpg',
  relativePath: 'infra.jpg',
  extension: 'jpg',
  size: 640064,
  prettySize: '640 kB',
  modifiedTime: '2018-04-04T08:18:52.000Z',
  accessTime: '2018-04-04T10:32:20.214Z',
  changeTime: '2018-04-13T15:16:54.832Z',
  birthTime: '2018-04-04T10:32:20.214Z',
  root: 'D:/',
  dir: 'D:/Develop/gat/src/img',
  base: 'infra.jpg',
  ext: '.jpg',
  name: 'infra',
  relativeDirectory: '',
  dev: 1928810958,
  mode: 33206,
  nlink: 1,
  uid: 0,
  gid: 0,
  rdev: 0,
  ino: 5910974511409406,
  atimeMs: 1522837940214.0698,
  mtimeMs: 1522829932000,
  ctimeMs: 1523632614831.9194,
  birthtimeMs: 1522837940214.0698,
  atime: '2018-04-04T10:32:20.214Z',
  mtime: '2018-04-04T08:18:52.000Z',
  ctime: '2018-04-13T15:16:54.832Z',
  birthtime: '2018-04-04T10:32:20.214Z' }
warning The gatsby-source-filesystem plugin has generated no Gatsby nodes. Do you need it?
success source and transform nodes โ€” 0.318 s
success building schema โ€” 0.484 s
success createLayouts โ€” 0.041 s
success createPages โ€” 0.003 s
success createPagesStatefully โ€” 0.115 s
success onPreExtractQueries โ€” 0.003 s
success update schema โ€” 0.251 s
GraphQL Error Unknown field `imageSharp` on type `RootQueryType`

  file: D:/Develop/gat/src/pages/index.js

   1 |
   2 |   query ImageQuery {
>  3 |     peopleImage: imageSharp(id: { regex: "/people/" }) {
     |                  ^
   4 |       sizes(maxWidth: 500) {
   5 |         ...GatsbyImageSharpSizes_withWebp_tracedSVG
   6 |       }
   7 |     },
   8 |     ghoomkeImage: imageSharp(id: { regex: "/ghoomke/" }) {
   9 |       sizes(maxWidth: 500) {
  10 |         ...GatsbyImageSharpSizes_withWebp_tracedSVG
  11 |       }
  12 |     },
  13 |     ecartImage: imageSharp(id: { regex: "/peopleecart/" }) {

success extract queries from components โ€” 0.157 s
success run graphql queries โ€” 0.033 s
success write out page data โ€” 0.021 s
success write out redirect data โ€” 0.002 s
success onPostBootstrap โ€” 0.011 s

package.json

{
  "name": "gatsby-starter-default",
  "description": "Gatsby default starter",
  "version": "1.0.0",
  "author": "K",
  "dependencies": {
    "autoprefixer": "^8.2.0",
    "gatsby": "1.9.250",
    "gatsby-image": "^1.0.43",
    "gatsby-link": "^1.6.39",
    "gatsby-plugin-manifest": "^1.0.15",
    "gatsby-plugin-netlify": "^1.0.19",
    "gatsby-plugin-nprogress": "^1.0.14",
    "gatsby-plugin-offline": "^1.0.15",
    "gatsby-plugin-postcss-sass": "^1.0.19",
    "gatsby-plugin-preact": "^1.0.17",
    "gatsby-plugin-react-helmet": "^2.0.8",
    "gatsby-plugin-sharp": "^1.6.42",
    "gatsby-plugin-webpack-bundle-analyzer": "^0.1.1",
    "gatsby-source-filesystem": "1.5.31",
    "gatsby-transformer-sharp": "^1.6.22",
    "react-helmet": "^5.2.0",
    "react-spring": "^4.0.4"
  },
  "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"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}

gatsby-config.js

var autoprefixer = require('autoprefixer');

module.exports = {
  siteMetadata: {
    title: 'Gatsby Default Starter',
  },
  plugins: [
    {
      resolve: 'gatsby-plugin-webpack-bundle-analyzer',
      options: {
        production: true,
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `img`,
        path: `${__dirname}/src/img/`,
      },
    },
    'gatsby-plugin-react-helmet',
    'gatsby-plugin-preact',
    'gatsby-transformer-sharp',
    'gatsby-plugin-sharp',
    {
      resolve: `gatsby-plugin-nprogress`,
      options: {
        // Setting a color is optional.
        color: `tomato`,
        // Disable the loading spinner.
        showSpinner: false,
      },
    },
    {
      resolve: `gatsby-plugin-postcss-sass`,
      options: {
        postCssPlugins: [autoprefixer()],
      },
    },
    'gatsby-plugin-offline',
    'gatsby-plugin-netlify',
  ],
}

bug

Most helpful comment

Thanks for easy way to reproduce - quick PR with fix: https://github.com/gatsbyjs/gatsby/pull/4998 if you want to follow.

All 4 comments

Hey, can you share your repository (publicly or privately via mail to [email protected]) so I could reproduce and prepare fix?

Thanks for easy way to reproduce - quick PR with fix: https://github.com/gatsbyjs/gatsby/pull/4998 if you want to follow.

Gatsby 1.9.251 out with the fix ๐ŸŽ‰

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brandonmp picture brandonmp  ยท  3Comments

kalinchernev picture kalinchernev  ยท  3Comments

ferMartz picture ferMartz  ยท  3Comments

theduke picture theduke  ยท  3Comments

KyleAMathews picture KyleAMathews  ยท  3Comments