Report: flagship/benchmark Strapi + Gatsby demo projects fail to build

Session Log: Build Failure for strapi-starter-gatsby-blog

Clone the project repo:

$ git clone https://github.com/strapi/strapi-starter-gatsby-blog.git
Cloning into 'strapi-starter-gatsby-blog'...
remote: Enumerating objects: 705, done.
remote: Counting objects: 100% (147/147), done.
remote: Compressing objects: 100% (112/112), done.
remote: Total 705 (delta 71), reused 90 (delta 35), pack-reused 558
Receiving objects: 100% (705/705), 184.20 MiB | 32.12 MiB/s, done.
Resolving deltas: 100% (293/293), done.

$ cd strapi-starter-gatsby-blog/

$ ls
LICENSE.txt  README.md  screenshot.png  starter  starter.json  yarn.lock

yarn-based build fails:

$ yarn create strapi-starter my-project gatsby-blog
yarn create v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-strapi-starter@4.0.0" with binaries:
      - create-strapi-starter
? Choose your installation type Quickstart (recommended)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at getPackageInfo (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/fetch-npm-starter.js:19:27)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async getStarterInfo (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/build-starter.js:109:26)
    at async buildStarter (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/build-starter.js:133:7)
Done in 5.88s.

npx-based build fails:

$ npx create-strapi-starter my-project gatsby-blog
? Choose your installation type Quickstart (recommended)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at getPackageInfo (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/fetch-npm-starter.js:19:27)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async getStarterInfo (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/build-starter.js:109:26)
    at async buildStarter (/home/dpc/.config/yarn/global/node_modules/create-strapi-starter/utils/build-starter.js:133:7)

npx using version flag succeeds:

$ npx create-strapi-starter@3 my-project gatsby-blog
npx: installed 159 in 9.446s
? Choose your installation type Quickstart (recommended)
Creating a quickstart project.
Creating a new Strapi application at /home/dpc/dpc.data/local.FS/lfs.03-Projects.Active/project.MindCurrent/dev/on.GitLab/develop/build/back-ends/prototypes/headless-CMSs/test.strapi-gatsby-demo-projects/strapi-starter-gatsby-blog/my-project/backend.
Creating files.
Installing strapi/strapi-template-blog template.
Dependencies installed successfully.

Your application was created at /home/dpc/dpc.data/local.FS/lfs.03-Projects.Active/project.MindCurrent/dev/on.GitLab/develop/build/back-ends/prototypes/headless-CMSs/test.strapi-gatsby-demo-projects/strapi-starter-gatsby-blog/my-project/backend.

Available commands in your project:

  yarn develop
  Start Strapi in watch mode.

  yarn start
  Start Strapi without watch mode.

  yarn build
  Build Strapi admin panel.

  yarn strapi
  Display all available commands.

You can start by doing:

  cd /home/dpc/dpc.data/local.FS/lfs.03-Projects.Active/project.MindCurrent/dev/on.GitLab/develop/build/back-ends/prototypes/headless-CMSs/test.strapi-gatsby-demo-projects/strapi-starter-gatsby-blog/my-project/backend
  yarn develop

Creating Strapi starter frontend at /home/dpc/dpc.data/local.FS/lfs.03-Projects.Active/project.MindCurrent/dev/on.GitLab/develop/build/back-ends/prototypes/headless-CMSs/test.strapi-gatsby-demo-projects/strapi-starter-gatsby-blog/my-project/frontend.
Installing strapi/strapi-starter-gatsby-blog starter
Dependencies installed successfully.
Dependencies installed successfully.
Starting the app
yarn run v1.22.17
$ cross-env FORCE_COLOR=1 npm-run-all -l -p develop:*
$ yarn --cwd backend develop
$ wait-on http://localhost:1337/admin && yarn --cwd frontend develop
$ strapi develop
[develop:backend ] Building your admin UI with development configuration ...
[develop:backend ] ℹ Compiling Webpack
[develop:backend ] ✔ Webpack: Compiled successfully in 33.07s
[develop:backend ] [2021-12-21T22:19:18.429Z] info File created: /home/dpc/dpc.data/local.FS/lfs.03-Projects.Active/project.MindCurrent/dev/on.GitLab/develop/build/back-ends/prototypes/headless-CMSs/test.strapi-gatsby-demo-projects/strapi-starter-gatsby-blog/my-project/backend/extensions/users-permissions/config/jwt.js
[develop:backend ] Setting up the template...
[develop:backend ] Ready to go
[develop:backend ] 
[develop:backend ]  Project information
[develop:backend ] 
[develop:backend ] ┌────────────────────┬──────────────────────────────────────────────────┐
[develop:backend ] │ Time               │ Tue Dec 21 2021 14:19:25 GMT-0800 (Pacific Stan… │
[develop:backend ] │ Launched in        │ 17739 ms                                         │
[develop:backend ] │ Environment        │ development                                      │
[develop:backend ] │ Process PID        │ 18098                                            │
[develop:backend ] │ Version            │ 3.6.8 (node v14.17.4)                            │
[develop:backend ] │ Edition            │ Community                                        │
[develop:backend ] └────────────────────┴──────────────────────────────────────────────────┘
[develop:backend ] 
[develop:backend ]  Actions available
[develop:backend ] 
[develop:backend ] One more thing...
[develop:backend ] Create your first administrator 💻 by going to the administration panel at:
[develop:backend ] 
[develop:backend ] ┌─────────────────────────────┐
[develop:backend ] │ http://localhost:1337/admin │
[develop:backend ] └─────────────────────────────┘
[develop:backend ] 
[develop:backend ] [2021-12-21T22:19:25.268Z] debug HEAD /admin (31 ms) 200
[develop:backend ] [2021-12-21T22:19:25.338Z] debug HEAD /admin (3 ms) 200
[develop:backend ] [2021-12-21T22:19:25.339Z] info ⏳ Opening the admin panel...
$ gatsby develop --open
[develop:backend ] [2021-12-21T22:19:26.134Z] debug GET /admin (2 ms) 200
[develop:backend ] [2021-12-21T22:19:26.300Z] debug GET /admin/runtime~main.dbd09018.js (17 ms) 200
[develop:backend ] [2021-12-21T22:19:26.309Z] debug GET /admin/main.79b50822.chunk.js (8 ms) 200
[develop:backend ] [2021-12-21T22:19:28.357Z] debug GET /admin/init (6 ms) 200
[develop:backend ] [2021-12-21T22:19:28.966Z] debug GET /admin/07109cdae9f760e8d97c89788c9dc9df.png (3 ms) 200
[develop:backend ] [2021-12-21T22:19:29.044Z] debug GET /admin/842e7845f3f8e943ff712a39617b6b70.svg (5 ms) 200
[develop:backend ] [2021-12-21T22:19:29.076Z] debug GET /admin/75614cfcfedd509b1f7ac1c26c53bb7f.woff2 (18 ms) 200
[develop:backend ] [2021-12-21T22:19:29.078Z] debug GET /admin/a6069540692725c247f13984a9598a92.woff2 (16 ms) 200
[develop:backend ] [2021-12-21T22:19:29.091Z] debug GET /admin/21b3848a32fce5b0f5014948186f6964.woff2 (6 ms) 200
[develop:frontend] info We're shipping new features! For final testing, we're rolling them out
[develop:frontend] first to a small % of Gatsby users
[develop:frontend] and your site was automatically chosen as one of them. With your help, we'll
[develop:frontend] then release them to everyone in the next minor release.
[develop:frontend] 
[develop:frontend] We greatly appreciate your help testing the change. Please report any feedback
[develop:frontend] good or bad in the umbrella issue. If you do encounter problems, please disable
[develop:frontend] the flag by setting it to false in your gatsby-config.js like:
[develop:frontend] 
[develop:frontend] flags: {
[develop:frontend]   THE_FLAG: false
[develop:frontend] }
[develop:frontend] 
[develop:frontend] The following flags were automatically enabled on your site:
[develop:frontend] - DEV_SSR · (Umbrella Issue (https://gatsby.dev/dev-ssr-feedback)) · Server Side
[develop:frontend]  Render (SSR) pages on full reloads during develop. Helps you detect SSR bugs
[develop:frontend] and fix them without needing to do full builds.
[develop:frontend] 
success open and validate gatsby-configs - 0.143s
success load plugins - 2.421s
success onPreInit - 0.053s
success initialize cache - 0.009s
success copy gatsby files - 0.089s
success onPreBootstrap - 0.032s
success createSchemaCustomization - 0.006s
info Starting to fetch data from Strapi - http://localhost:1337/articles with
[develop:frontend] params {"_limit":1000}
info Starting to fetch data from Strapi - http://localhost:1337/categories with
[develop:frontend] params {"_limit":1000}
info Starting to fetch data from Strapi - http://localhost:1337/writers with
[develop:frontend] params {"_limit":1000}
info Starting to fetch data from Strapi - http://localhost:1337/homepage with
[develop:frontend] params {"_limit":1000}
info Starting to fetch data from Strapi - http://localhost:1337/global with
[develop:frontend] params {"_limit":1000}
[develop:frontend] 
[develop:backend ] [2021-12-21T22:19:37.663Z] debug GET /articles?_limit=1000 (89 ms) 200
[develop:backend ] [2021-12-21T22:19:37.682Z] debug GET /categories?_limit=1000 (99 ms) 200
[develop:backend ] [2021-12-21T22:19:37.701Z] debug GET /writers?_limit=1000 (114 ms) 200
[develop:backend ] [2021-12-21T22:19:37.710Z] debug GET /uploads/daviddoe_strapi_io_09aa0f249b.jpg (4 ms) 200
[develop:backend ] [2021-12-21T22:19:37.711Z] debug GET /uploads/sarahbaker_strapi_io_f6e6a84106.jpg (3 ms) 200
[develop:backend ] [2021-12-21T22:19:37.716Z] debug GET /homepage?_limit=1000 (124 ms) 200
[develop:backend ] [2021-12-21T22:19:37.719Z] debug GET /uploads/a_bug_is_becoming_a_meme_on_the_internet_e7fdbd0ba6.jpg (6 ms) 200
[develop:backend ] [2021-12-21T22:19:37.723Z] debug GET /global?_limit=1000 (128 ms) 200
[develop:backend ] [2021-12-21T22:19:37.730Z] debug GET /uploads/what_s_inside_a_black_hole_44d6b8e837.jpg (12 ms) 200
[develop:backend ] [2021-12-21T22:19:37.733Z] debug GET /uploads/we_love_pizza_f4f01fe4e0.jpg (13 ms) 200
[develop:backend ] [2021-12-21T22:19:37.735Z] debug GET /uploads/this_shrimp_is_awesome_06aaf48d7e.jpg (4 ms) 200
[develop:backend ] [2021-12-21T22:19:37.740Z] debug GET /uploads/the_internet_s_own_boy_64c4609e1c.jpg (6 ms) 200
[develop:backend ] [2021-12-21T22:19:37.742Z] debug GET /uploads/default_image_42607d6719.png (6 ms) 200
[develop:backend ] [2021-12-21T22:19:37.743Z] debug GET /uploads/default_image_1f6f293916.png (4 ms) 200
[develop:backend ] [2021-12-21T22:19:37.808Z] debug GET /uploads/beautiful_picture_1825c1fe68.jpg (2 ms) 200
success Fetched Strapi Data - 0.472s
success Checking for changed pages - 0.001s
success source and transform nodes - 0.577s
success building schema - 1.032s
info Total nodes: 75, SitePage nodes: 1 (use --verbose for breakdown)
success createPages - 0.006s
success Checking for changed pages - 0.000s
success createPagesStatefully - 0.185s
success update schema - 0.084s
success write out redirect data - 0.001s
success Build manifest and related icons - 0.103s
success onPostBootstrap - 0.108s
info bootstrap finished - 9.008s
success onPreExtractQueries - 0.001s
success extract queries from components - 1.812s
success write out requires - 0.011s
success run static queries - 2.265s - 4/4 1.77/s
success run page queries - 0.011s - 3/3 267.16/s
warn Browserslist: caniuse-lite is outdated. Please run:
[develop:frontend] npx browserslist@latest --update-db
[develop:frontend] 
[develop:frontend] Why you should do it regularly:
[develop:frontend] https://github.com/browserslist/browserslist#browsers-data-updating
warn Browserslist: caniuse-lite is outdated. Please run:
[develop:frontend] npx browserslist@latest --update-db
[develop:frontend] 
[develop:frontend] Why you should do it regularly:
[develop:frontend] https://github.com/browserslist/browserslist#browsers-data-updating
warn Browserslist: caniuse-lite is outdated. Please run:
[develop:frontend] npx browserslist@latest --update-db
[develop:frontend] 
[develop:frontend] Why you should do it regularly:
[develop:frontend] https://github.com/browserslist/browserslist#browsers-data-updating
⠀
You can now view gatsby-starter-default in the browser.
⠀
  http://localhost:8000/
⠀
View GraphiQL, an in-browser IDE, to explore your site's data and schema
⠀
  http://localhost:8000/___graphql
⠀
Note that the development build is not optimized.
To create a production build, use gatsby build
⠀
success Building development bundle - 14.493s
success onPreExtractQueries - 0.008s
success extract queries from components - 0.123s
success write out requires - 0.017s
success run page queries - 1.648s - 1/1 0.61/s
[develop:frontend] 
^C^C^Cdpc@LT3-Insp17-2017:strapi-starter-gatsby-blog$ npx create-strapi-starter@3 my-project gatsby-blog