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
Tag: gatsby
Google Consent Mode Implementation using Gatsby
I am following this tutorial about implementing google consent mode to add cookies to my website ! By using Gatsby.js I am not sure how to add these codes : Do you have any idea how to implement this code in Gatsby , is there any library or something that will help to implement these scripts ! Thanks Answer This
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.
Programatically generating Gatsby pages without a slug from Graphql
I have set up an ACF options page in WordPress called Projects Inside the Projects options page there is an ACF repeater allowing the user to add multiple Projects. In Gatsby, I’m using Graphql to query the data for my Projects in two files: Inside a custom hook, allowing access to the data globally in my Gatsby site Inside a
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
Why I’m getting CssSyntaxError of missing semicolon in Gatsby build?
I’m working on a Gatsby page using Material UI. The page design is almost complete, but when I’m finished, I get a strange build error on npm run build. I have no idea where this error is coming from, but I’ve spent several hours trying to resolve it with no success. Is anyone able to assist me with this? If
Cannot query field “image” on type “Query” GraphCMS with Gatsbyjs
Good Evening, I am new to Gatsby and Graphql. I am experimenting with the CMS system, but I have no idea what this error means. Any help would be appreciated. The marked below is the error that I have been getting. I do have the folder graphcms-fragmetns in my root folder. I have followed the documentation that’s out there, but