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

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

Clone the project repo:

$ git clone https://github.com/strapi/strapi-starter-gatsby-corporate.git
Cloning into 'strapi-starter-gatsby-corporate'...
remote: Enumerating objects: 487, done.
remote: Counting objects: 100% (487/487), done.
remote: Compressing objects: 100% (288/288), done.
remote: Total 487 (delta 279), reused 362 (delta 175), pack-reused 0
Receiving objects: 100% (487/487), 580.05 KiB | 6.59 MiB/s, done.
Resolving deltas: 100% (279/279), done.
dpc@LT3-Insp17-2017:test.strapi-gatsby-demo-projects$ ls
strapi-starter-gatsby-blog  strapi-starter-gatsby-corporate

$ cd strapi-starter-gatsby-corporate/
$ ls
LICENSE.txt  README.md  starter  starter.json

yarn-based build fails:

$ # Using Yarn
$ yarn create strapi-starter my-site gatsby-corporate
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.2" 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 143.23s. 

npx-based build fails:

dpc@LT3-Insp17-2017:strapi-starter-gatsby-corporate$ # Or using NPM
dpc@LT3-Insp17-2017:strapi-starter-gatsby-corporate$ npx create-strapi-starter my-site gatsby-corporate
? 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-site gatsby-corporate
npx: installed 159 in 9.22s
? 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-corporate/my-site/backend.
Creating files.
Installing strapi/strapi-template-corporate 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-corporate/my-site/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-corporate/my-site/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-corporate/my-site/frontend.
Installing strapi/strapi-starter-gatsby-corporate 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 40.18s
[develop:backend ] [2021-12-22T22:09:40.054Z] 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-corporate/my-site/backend/extensions/users-permissions/config/jwt.js
[develop:backend ] 
[develop:backend ]  Project information
[develop:backend ] 
[develop:backend ] ┌────────────────────┬──────────────────────────────────────────────────┐
[develop:backend ] │ Time               │ Wed Dec 22 2021 14:09:55 GMT-0800 (Pacific Stan… │
[develop:backend ] │ Launched in        │ 27562 ms                                         │
[develop:backend ] │ Environment        │ development                                      │
[develop:backend ] │ Process PID        │ 26785                                            │
[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-22T22:09:55.389Z] debug HEAD /admin (26 ms) 200
[develop:backend ] [2021-12-22T22:09:55.463Z] debug HEAD /admin (5 ms) 200
[develop:backend ] [2021-12-22T22:09:55.465Z] info ⏳ Opening the admin panel...
$ gatsby develop --open
[develop:backend ] [2021-12-22T22:09:56.391Z] debug GET /admin (6 ms) 200
[develop:backend ] [2021-12-22T22:09:56.801Z] debug GET /admin/runtime~main.dbd09018.js (14 ms) 200
[develop:backend ] [2021-12-22T22:09:56.805Z] debug GET /admin/main.79b50822.chunk.js (6 ms) 200
[develop:backend ] [2021-12-22T22:09:57.772Z] debug GET /favicon.ico (0 ms) 200
[develop:backend ] [2021-12-22T22:09:57.933Z] debug POST /graphql (115 ms) 200
[develop:backend ] [2021-12-22T22:09:58.825Z] debug GET /admin/init (4 ms) 200
[develop:backend ] [2021-12-22T22:09:59.586Z] debug GET /admin/07109cdae9f760e8d97c89788c9dc9df.png (3 ms) 200
[develop:backend ] [2021-12-22T22:09:59.686Z] debug GET /admin/842e7845f3f8e943ff712a39617b6b70.svg (5 ms) 200
[develop:backend ] [2021-12-22T22:09:59.699Z] debug GET /admin/75614cfcfedd509b1f7ac1c26c53bb7f.woff2 (2 ms) 200
[develop:backend ] [2021-12-22T22:09:59.771Z] debug GET /admin/a6069540692725c247f13984a9598a92.woff2 (4 ms) 200
[develop:backend ] [2021-12-22T22:09:59.805Z] debug GET /admin/21b3848a32fce5b0f5014948186f6964.woff2 (5 ms) 200
[develop:frontend] info
[develop:frontend] 
[develop:frontend] There are 3 other flags available that you might be interested in:
[develop:frontend] - FAST_DEV · Enable all experiments aimed at improving develop server start time
[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] - PRESERVE_WEBPACK_CACHE · (Umbrella Issue
[develop:frontend] (https://gatsby.dev/cache-clearing-feedback)) · Don't delete webpack's cache
[develop:frontend] when changing gatsby-node.js & gatsby-config.js files.
[develop:frontend] - PRESERVE_FILE_DOWNLOAD_CACHE · (Umbrella Issue
[develop:frontend] (https://gatsby.dev/cache-clearing-feedback)) · Don't delete the downloaded
[develop:frontend] files cache when changing gatsby-node.js & gatsby-config.js files.
[develop:frontend] - PARALLEL_SOURCING · EXPERIMENTAL · (Umbrella Issue
[develop:frontend] (https://gatsby.dev/parallel-sourcing-feedback)) · Run all source plugins at the
[develop:frontend]  same time instead of serially. For sites with multiple source plugins, this can
[develop:frontend]  speedup sourcing and transforming considerably.
[develop:frontend] 
success open and validate gatsby-configs - 0.193s
success load plugins - 1.732s
success onPreInit - 0.090s
success initialize cache - 0.012s
success copy gatsby files - 0.178s
success onPreBootstrap - 0.037s
success createSchemaCustomization - 0.007s
info Starting to fetch data from Strapi - http://localhost:1337/pages with
[develop:frontend] params {"_limit":1000,"_publicationState":"preview","_locale":"all"}
info Starting to fetch data from Strapi - http://localhost:1337/global with
[develop:frontend] params {"_limit":1000,"_locale":"en"}
info Starting to fetch data from Strapi - http://localhost:1337/global with
[develop:frontend] params {"_limit":1000,"_locale":"fr"}
[develop:frontend] 
[develop:backend ] [2021-12-22T22:10:08.529Z] debug POST /graphql (53 ms) 200
[develop:backend ] [2021-12-22T22:10:09.003Z] debug GET /pages?_limit=1000&_publicationState=preview&_locale=all (469 ms) 200
[develop:backend ] [2021-12-22T22:10:09.014Z] debug GET /global?_limit=1000&_locale=en (472 ms) 200
[develop:backend ] [2021-12-22T22:10:09.033Z] debug GET /global?_limit=1000&_locale=fr (485 ms) 200
[develop:backend ] [2021-12-22T22:10:09.058Z] debug GET /uploads/undraw_content_team_a85599f5f3.png (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.059Z] debug GET /uploads/undraw_content_team_18764c4c73.png (3 ms) 200
[develop:backend ] [2021-12-22T22:10:09.066Z] debug GET /uploads/undraw_content_team_22404387c7.png (7 ms) 200
[develop:backend ] [2021-12-22T22:10:09.068Z] debug GET /uploads/undraw_content_team_eacb35338d.png (6 ms) 200
[develop:backend ] [2021-12-22T22:10:09.106Z] debug GET /uploads/undraw_content_team_ee9e2bce9c.svg (2 ms) 200
[develop:backend ] [2021-12-22T22:10:09.111Z] debug GET /uploads/undraw_content_team_e2404bff54.svg (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.111Z] debug GET /uploads/logo_52370df5b0.png (2 ms) 200
[develop:backend ] [2021-12-22T22:10:09.112Z] debug GET /uploads/logo_249dff99bd.png (2 ms) 200
[develop:backend ] [2021-12-22T22:10:09.123Z] debug GET /uploads/undraw_design_page_a805f163be.svg (1 ms) 200
[develop:backend ] [2021-12-22T22:10:09.150Z] debug GET /uploads/undraw_design_page_b283e7c9da.svg (5 ms) 200
[develop:backend ] [2021-12-22T22:10:09.150Z] debug GET /uploads/logo_97108465bc.png (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.151Z] debug GET /uploads/logo_35c541c1d3.png (3 ms) 200
[develop:backend ] [2021-12-22T22:10:09.155Z] debug GET /uploads/undraw_create_page_dd137ade37.svg (3 ms) 200
[develop:backend ] [2021-12-22T22:10:09.192Z] debug GET /uploads/undraw_create_page_4e9011e785.svg (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.193Z] debug GET /uploads/favicon_41e96f9e23.png (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.195Z] debug GET /uploads/favicon_a3a6ff9ddd.png (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.196Z] debug GET /uploads/preview_d64bf25877.svg (3 ms) 200
[develop:backend ] [2021-12-22T22:10:09.243Z] debug GET /uploads/preview_5078450e0e.svg (3 ms) 200
[develop:backend ] [2021-12-22T22:10:09.244Z] debug GET /uploads/devices_37835a6c84.svg (2 ms) 200
[develop:backend ] [2021-12-22T22:10:09.283Z] debug GET /uploads/devices_5155dca8c5.svg (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.286Z] debug GET /uploads/palette_57342bd6b1.svg (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.342Z] debug GET /uploads/palette_20ce9727d7.svg (7 ms) 200
[develop:backend ] [2021-12-22T22:10:09.344Z] debug GET /uploads/logo_4c9a5d7893.png (8 ms) 200
[develop:backend ] [2021-12-22T22:10:09.398Z] debug GET /uploads/logo_751f7c8d95.png (6 ms) 200
[develop:backend ] [2021-12-22T22:10:09.412Z] debug GET /uploads/logo_6d02e43dfb.png (9 ms) 200
[develop:backend ] [2021-12-22T22:10:09.462Z] debug GET /uploads/logo_65d8747fab.png (3 ms) 200
[develop:backend ] [2021-12-22T22:10:09.473Z] debug GET /uploads/logo_394bf2014a.png (4 ms) 200
[develop:backend ] [2021-12-22T22:10:09.504Z] debug GET /uploads/logo_c84abf9c79.png (2 ms) 200
[develop:backend ] [2021-12-22T22:10:09.505Z] debug GET /uploads/logo_703d2adb9f.png (2 ms) 200
[develop:backend ] [2021-12-22T22:10:09.545Z] debug GET /uploads/logo_c2d4f2e4a8.png (3 ms) 200
[develop:backend ] [2021-12-22T22:10:09.562Z] debug GET /uploads/user_3bb0191d53.png (11 ms) 200
success Fetched Strapi Data - 1.268s
success Checking for changed pages - 0.002s
success source and transform nodes - 1.463s
success building schema - 1.300s
info Total nodes: 111, SitePage nodes: 9 (use --verbose for breakdown)
success createPages - 0.122s
success Checking for changed pages - 0.001s
success createPagesStatefully - 0.105s
success update schema - 0.043s
success write out redirect data - 0.004s
success Build manifest and related icons - 0.095s
success onPostBootstrap - 0.102s
info bootstrap finished - 10.378s
success onPreExtractQueries - 0.001s
[develop:frontend] 
success extract queries from components - 2.682s
success write out requires - 0.012s
success run page queries - 0.129s - 3/3 23.22/s
[develop:frontend] 
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
[develop:frontend] 
[develop:backend ] [2021-12-22T22:10:17.719Z] debug POST /graphql (32 ms) 200
[develop:backend ] [2021-12-22T22:10:20.770Z] debug POST /graphql (29 ms) 200
[develop:backend ] [2021-12-22T22:10:23.859Z] debug POST /graphql (55 ms) 200
[develop:backend ] [2021-12-22T22:10:26.909Z] debug POST /graphql (22 ms) 200
[develop:backend ] [2021-12-22T22:10:29.975Z] debug POST /graphql (43 ms) 200
[develop:backend ] [2021-12-22T22:10:33.053Z] debug POST /graphql (28 ms) 200
[develop:backend ] [2021-12-22T22:10:36.101Z] debug POST /graphql (28 ms) 200
[develop:backend ] [2021-12-22T22:10:39.153Z] debug POST /graphql (34 ms) 200
[develop:backend ] [2021-12-22T22:10:42.194Z] debug POST /graphql (24 ms) 200
⠀
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 - 33.455s
[develop:frontend] 
[develop:backend ] [2021-12-22T22:10:48.375Z] debug POST /graphql (99 ms) 200
[develop:backend ] [2021-12-22T22:10:50.253Z] debug GET /uploads/undraw_content_team_e2404bff54.svg (10 ms) 200
[develop:backend ] [2021-12-22T22:10:50.257Z] debug GET /uploads/undraw_design_page_b283e7c9da.svg (8 ms) 200
[develop:backend ] [2021-12-22T22:10:50.261Z] debug GET /uploads/undraw_create_page_4e9011e785.svg (7 ms) 200
[develop:backend ] [2021-12-22T22:10:50.264Z] debug GET /uploads/preview_5078450e0e.svg (6 ms) 200
[develop:backend ] [2021-12-22T22:10:50.269Z] debug GET /uploads/devices_5155dca8c5.svg (8 ms) 200
[develop:backend ] [2021-12-22T22:10:50.270Z] debug GET /uploads/palette_20ce9727d7.svg (5 ms) 200
[develop:backend ] [2021-12-22T22:10:50.271Z] debug GET /uploads/user_e6ecb8e059.png (4 ms) 200
[develop:backend ] [2021-12-22T22:10:50.280Z] debug GET /uploads/logo_c2d4f2e4a8.png (6 ms) 200
[develop:backend ] [2021-12-22T22:10:50.283Z] debug GET /uploads/logo_751f7c8d95.png (5 ms) 200
[develop:backend ] [2021-12-22T22:10:50.303Z] debug GET /uploads/logo_c84abf9c79.png (4 ms) 200
[develop:backend ] [2021-12-22T22:10:50.303Z] debug GET /uploads/logo_65d8747fab.png (7 ms) 200
[develop:backend ] [2021-12-22T22:10:51.439Z] debug POST /graphql (33 ms) 200
[develop:backend ] [2021-12-22T22:10:54.516Z] debug POST /graphql (36 ms) 200
[develop:backend ] [2021-12-22T22:10:57.589Z] debug POST /graphql (42 ms) 200
[develop:backend ] [2021-12-22T22:11:00.656Z] debug POST /graphql (39 ms) 200
[develop:backend ] [2021-12-22T22:11:03.853Z] debug POST /graphql (99 ms) 200

[...]

[develop:backend ] [2021-12-22T22:13:30.371Z] debug POST /graphql (36 ms) 200
[develop:backend ] [2021-12-22T22:13:33.441Z] debug POST /graphql (36 ms) 200
[develop:backend ] [2021-12-22T22:13:35.676Z] debug GET /uploads/undraw_content_team_e2404bff54.svg (9 ms) 200
[develop:backend ] [2021-12-22T22:13:35.684Z] debug GET /uploads/undraw_design_page_b283e7c9da.svg (6 ms) 200
[develop:backend ] [2021-12-22T22:13:35.688Z] debug GET /uploads/undraw_create_page_4e9011e785.svg (7 ms) 200
[develop:backend ] [2021-12-22T22:13:35.692Z] debug GET /uploads/preview_5078450e0e.svg (8 ms) 200
[develop:backend ] [2021-12-22T22:13:35.697Z] debug GET /uploads/palette_20ce9727d7.svg (9 ms) 200
[develop:backend ] [2021-12-22T22:13:35.698Z] debug GET /uploads/devices_5155dca8c5.svg (7 ms) 200
[develop:backend ] [2021-12-22T22:13:35.707Z] debug GET /uploads/user_e6ecb8e059.png (3 ms) 200
[develop:backend ] [2021-12-22T22:13:35.712Z] debug GET /uploads/logo_c2d4f2e4a8.png (2 ms) 200
[develop:backend ] [2021-12-22T22:13:35.737Z] debug GET /uploads/logo_751f7c8d95.png (2 ms) 200
[develop:backend ] [2021-12-22T22:13:35.772Z] debug GET /uploads/logo_65d8747fab.png (5 ms) 200
[develop:backend ] [2021-12-22T22:13:35.777Z] debug GET /uploads/logo_c84abf9c79.png (3 ms) 200
[develop:backend ] [2021-12-22T22:13:36.611Z] debug POST /graphql (86 ms) 200
[develop:backend ] [2021-12-22T22:13:39.739Z] debug POST /graphql (90 ms) 200
[develop:backend ] [2021-12-22T22:13:42.828Z] debug POST /graphql (28 ms) 200
[develop:backend ] [2021-12-22T22:13:45.881Z] debug POST /graphql (28 ms) 200
[develop:backend ] [2021-12-22T22:13:48.952Z] debug POST /graphql (35 ms) 200
[develop:backend ] [2021-12-22T22:13:51.016Z] debug POST /graphql (27 ms) 200

^C^C
$