Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Sometimes the build crashes due formatString argument on date #10

Closed
diegonvs opened this issue Nov 16, 2018 · 2 comments
Closed

Sometimes the build crashes due formatString argument on date #10

diegonvs opened this issue Nov 16, 2018 · 2 comments

Comments

@diegonvs
Copy link
Owner

Sometimes the console blows up this error:

GraphQL Error Unknown argument `formatString`

  file: /Users/diegonascimento/workspace/gatsby-boilerplate/src/components/Blog/BlogList/BlogList.js

   1 |
   2 |             query {
   3 |                 allMdx(filter: { fields: { slug: { regex: "/^blog/i"}, title: {  ne: "" } } },
   4 |                     sort: {order:DESC, fields: frontmatter___date}
   5 |                 ) {
   6 |                     edges {
   7 |                         node {
   8 |                             fields {
   9 |                                 slug
  10 |                                 title
> 11 |                                 date(formatString: "MMMM DD, YYYY")
     |                                      ^
  12 |                                 description
  13 |                                 author
  14 |                                 banner
  15 |                             }
  16 |                         }
  17 |                     }
  18 |                 }
  19 |             }
  20 |

 ERROR  Failed to compile with 1 errors                                       21:35:50

 error  in ./src/components/Blog/BlogList/BlogList.js

Module Error (from ./node_modules/eslint-loader/index.js):

/Users/diegonascimento/workspace/gatsby-boilerplate/src/components/Blog/BlogList/BlogList.js
  38:38  error  Unknown argument "formatString" on field "date" of type "fields_2"  graphql/template-strings

✖ 1 problem (1 error, 0 warnings)


 @ ./src/components/Blog/BlogList/index.js 7:0-34 8:15-23
 @ ./src/components/Blog/BlogMain/BlogMain.js
 @ ./src/components/Blog/BlogMain/index.js
 @ ./src/templates/blog.js
 @ ./gatsby/.cache/gatsby-mdx/mdx-wrappers-dir/ba7d3c27d52f0929fb04a0681cc61514--scope-hash-3010b3badc54a9dfa4a4c80e419a41b2.js
 @ ./.cache/sync-requires.js
 @ ./.cache/app.js
 @ multi ./node_modules/react-hot-loader/patch.js (webpack)-hot-middleware/client.js?path=http://localhost:8000/__webpack_hmr&reload=true&overlay=false ./.cache/app

✖ 「wdm」:
ERROR in ./src/components/Blog/BlogList/BlogList.js
Module Error (from ./node_modules/eslint-loader/index.js):

/Users/diegonascimento/workspace/gatsby-boilerplate/src/components/Blog/BlogList/BlogList.js
  38:38  error  Unknown argument "formatString" on field "date" of type "fields_2"  graphql/template-strings

✖ 1 problem (1 error, 0 warnings)
@diegonvs
Copy link
Owner Author

A temporary workaround to solve this problem is to delete .cache folder and rerun your desired build task again.

@cgoncas
Copy link
Contributor

cgoncas commented Nov 28, 2018

Hey @diegonvs, any update with this issue? after delete .cache folder, I still can reproduce the issue :(

diegonvs added a commit that referenced this issue Dec 3, 2018
diegonvs added a commit that referenced this issue Dec 3, 2018
Fixes #10 | Prevent blog/index page when querying blog posts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants