The Strapi Starter Gatsby Blog v2

This article has been updated on 23rd February 2021.

Gatsby starter for creating a blog with Strapi.


This is a companion discussion topic for the original entry at https://strapi.io/blog/strapi-starter-gatsby-blog-v2

For me, this one command worked automatically setting up backend and frontend:

yarn create strapi-starter my-site gatsby-blog

From the Starter Readme:

Hi there, thanks for sharing that!

Can we choose modules when running the script at first time?

I tried to use SASS and none but stills getting that errors:

failed Building development bundle - 12.740s
ERROR in ./.cache/blank.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from 
./node_modules/postcss-loader/dist/cjs.js):
TypeError: Cannot read properties of undefined (reading 'config')
Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
TypeError: Cannot read properties of undefined (reading 'config')
    at getTailwindConfig

I see something related but before getting my hands into it (I’m not an expert) I prefer to engage some feedback :slight_smile:

This does not appear to be working anymore.

It throws a slew of errors, the top of which being a 403 so i think it’s safe to say it’s not setting up the user to connect the FE to make requests to the backend.

After watching other videos from Strapi blogs it seems i need to set up a “Public” role to connect the two pieces but none exist in this newest version of Strapi and the free tier does not allow me to add or remove existing Roles.

I’m shopping for new tech for clients and this is making it very difficult for me to get a feel for how the product works

No joy with this…

[develop:backend ] Watching /Users/~/blog-example and all sub-directories not excluded by your .gitignore. Will not monitor dotfiles.
[develop:backend ] Found & ignored ./.git ; is listed in .gitignore
[develop:backend ] Found & ignored ./backend ; is listed in .gitignore
[develop:backend ] Found & ignored ./frontend ; is listed in .gitignore
[develop:backend ] Found & ignored ./node_modules ; is listed in .gitignore
[develop:backend ] Found & ignored ./package.json ; is listed in .gitignore
[develop:backend ] Found & ignored ./yarn.lock ; is listed in .gitignore
[develop:backend ] 
[develop:backend ] Starting: develop:backend
[develop:backend ] node:internal/modules/cjs/loader:959
[develop:backend ]   throw err;
[develop:backend ]   ^
[develop:backend ] 
[develop:backend ] Error: Cannot find module '/Users/~/blog-example/develop:backend'
[develop:backend ]     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
[develop:backend ]     at Function.Module._load (node:internal/modules/cjs/loader:804:27)
[develop:backend ]     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[develop:backend ]     at node:internal/main/run_main_module:17:47 {
[develop:backend ]   code: 'MODULE_NOT_FOUND',
[develop:backend ]   requireStack: []
[develop:backend ] }

Actually, I could get the backend running by exiting and just going with ‘npm run develop’, but then the frontend server throws multiple errors, beginning with…

ERROR #85923  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "author" on type "SiteSiteMetadata".


it cascades onward from there.

If you navigate to the frontend folder and run

gatsby clean && gatsby develop

this clears the issue and the site runs correctly.