I am facing problem while I was setting up freecodecamp locally

There was an error in your GraphQL query:

Cannot query field "fields" on type "MarkdownRemark".

If you don't expect "fields" to exist on the type "MarkdownRemark" it is most
likely a typo.
However, if you expect "fields" to exist there are a couple of solutions to
common problems:

- If you added a new data source and/or changed something inside
gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in
GraphiQL and use the GraphiQL explorer to see which fields you can query and
what shape they have
- You want to optionally use your field "fields" and right now it is not used
anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL
schema. A quick fix is to add at least one entry with that field ("dummy
content")

It is recommended to explicitly type your GraphQL schema if you want to use
optional fields. This way you don't have to add the mentioned "dummy content".
Visit our docs to learn how you can define the schema for "MarkdownRemark":
https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization#
creating-type-definitions

File: gatsby-node.js:60:10

this was the error I was getting while setting freecodecamp locally

Welcome there,

Have you made any changes to the files? Or, is this just what you see after cloning the repo?

I am getting this error when I am running the development server for the first time. I have not made any changes to any files.

I solved the issue. I was on linux mint and I was using node version 18. this was causing problems i think. I installed nvm and I installed node v20.8.1 and tried again it worked. Thanks for the help. :grinning:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.