Skip to content
Advertisement

Tag: gatsby

gatsby-source-filesystem not sourcing files from site directory when used in a theme

I’m trying to build a gatsby theme that uses gatsby-source-filesystem to source images. I have set up a yarn workspace for development, my folder structure looks like this. The yarn workspace is also set up correctly and the gatsby-theme-example is a dependency of it. yarn workspaces info correctly shows it in workspaceDependencies. Both workspaces have a gatsby-config.js file, the gatsby-theme-example

ERROR #98123 WEBPACK when running `npm run develop`

I would like to create a new Gatsby site using the instructions on https://www.gatsbyjs.com/docs/quick-start , so I ran: Note: I didn’t change any configuration, so I’m using JavaScript (instead of TypeScript), not using a CMS, not using a styling system, and installed no additional features. During running npm run develop, I’m getting the following error: Environment: I’m not sure how

location props in gatsby is not defined

I am trying to use location props in my gastby page : I am passing props in my Link in pages/index.js: pages/date/[dateId]/index.js: eventually I get an error Parsing error: Identifier ‘location’ has already been declareded : Answer You should have the location variable already defined, it is likely in the global scope so you don’t need to pass it as

Gatsby: getImage returns undefined

getImage is returning undefined so my GatsbyImage component is not rendered. File structure: src/pages/gallery.js src/images (has 12 photos named photo-01.jpg, photo-02.jpg, …) I have the following code (gallery.js): what can i have wrong? Answer The problem is that you are mixing gatsby-image (from Gatsby 1 to Gatsby 2) and gatsby-plugin-image (from Gatsby 3 onwards). The first one is now deprecated.

How to get non-minified react errors for Gatsby

Trying to run gatsby build and getting this error message. failed We’ve encountered an error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Bid%2C%20frontmatter%2C%20parent%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings. To see the full message I have tried: “GATSBY_ENV=development && gatsby build –no-uglify” But this makes no changes. Message at reactjs.org Objects

How to create schema customization to use optional field “featureImage” from gatsby blog

I’m making a Gatsby blog as a side project. I want to use the “featureImage” optional field in mdx frontmatter. I tried to refer to the https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization#creating-type-definitions document according to the error message, but it was difficult to understand. This is part of my code. index.js gatsby-node.js I tried this and it works when featureImage is not present. But if

Advertisement