Session Log: Build Failure for strapi-starter-gatsby-catalog
Clone the project repo:
$ git clone https://github.com/strapi/strapi-starter-gatsby-catalog.git
$ git clone https://github.com/strapi/strapi-starter-gatsby-catalog.git
Cloning into 'strapi-starter-gatsby-catalog'...
remote: Enumerating objects: 505, done.
remote: Counting objects: 100% (505/505), done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 505 (delta 270), reused 467 (delta 243), pack-reused 0
Receiving objects: 100% (505/505), 2.85 MiB | 16.51 MiB/s, done.
Resolving deltas: 100% (270/270), done.
$ cd strapi-starter-gatsby-catalog/
$ ls
LICENSE.txt README.md screenshot.png starter starter.json
yarn-based build fails:
$ # Using Yarn
$ yarn create strapi-starter my-project gatsby-catalog
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 6.02s.
npx-based build fails:
$ # Or using NPM
$ npx create-strapi-starter my-project gatsby-catalog
? 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-catalog
npx: installed 159 in 9.563s
? 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-catalog/my-project/backend.
Creating files.
Installing strapi/strapi-template-catalog 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-catalog/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-catalog/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-catalog/my-project/frontend.
Installing strapi/strapi-starter-gatsby-catalog 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 39.55s
[develop:backend ] [2021-12-22T22:27:44.122Z] 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-catalog/my-project/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:27:55 GMT-0800 (Pacific Stan… │
[develop:backend ] │ Launched in │ 20838 ms │
[develop:backend ] │ Environment │ development │
[develop:backend ] │ Process PID │ 28424 │
[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:27:55.468Z] debug POST /graphql (14 ms) 405
[develop:backend ] [2021-12-22T22:27:55.563Z] debug HEAD /admin (5 ms) 200
[develop:backend ] [2021-12-22T22:27:55.565Z] info ⏳ Opening the admin panel...
[develop:backend ] [2021-12-22T22:27:55.612Z] debug HEAD /admin (1 ms) 200
$ gatsby develop --open
[develop:backend ] [2021-12-22T22:27:56.348Z] debug GET /admin (2 ms) 200
[develop:backend ] [2021-12-22T22:27:56.499Z] debug GET /admin/runtime~main.a3b8c49f.js (22 ms) 200
[develop:backend ] [2021-12-22T22:27:56.502Z] debug GET /admin/main.4eeac8b8.chunk.js (14 ms) 200
[develop:backend ] [2021-12-22T22:27:57.531Z] debug GET /favicon.ico (2 ms) 200
[develop:backend ] [2021-12-22T22:27:58.609Z] debug GET /admin/init (13 ms) 200
[develop:backend ] [2021-12-22T22:28:00.200Z] debug GET /admin/07109cdae9f760e8d97c89788c9dc9df.png (9 ms) 200
[develop:backend ] [2021-12-22T22:28:00.291Z] debug GET /admin/842e7845f3f8e943ff712a39617b6b70.svg (5 ms) 200
[develop:backend ] [2021-12-22T22:28:00.329Z] debug GET /admin/75614cfcfedd509b1f7ac1c26c53bb7f.woff2 (10 ms) 200
[develop:backend ] [2021-12-22T22:28:00.329Z] debug GET /admin/a6069540692725c247f13984a9598a92.woff2 (7 ms) 200
[develop:backend ] [2021-12-22T22:28:00.338Z] debug GET /admin/21b3848a32fce5b0f5014948186f6964.woff2 (3 ms) 200
[develop:backend ] [2021-12-22T22:28:00.491Z] debug POST /graphql (2 ms) 405
[develop:backend ] [2021-12-22T22:28:05.517Z] debug POST /graphql (1 ms) 405
[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.161s
success load plugins - 1.814s
success onPreInit - 0.058s
success initialize cache - 0.008s
success copy gatsby files - 0.103s
success onPreBootstrap - 0.050s
success createSchemaCustomization - 0.006s
info Starting to fetch data from Strapi - http://localhost:1337/products 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/global with
[develop:frontend] params {"_limit":1000}
[develop:frontend]
[develop:backend ] [2021-12-22T22:28:09.438Z] debug GET /products?_limit=1000 (144 ms) 200
[develop:backend ] [2021-12-22T22:28:09.482Z] debug GET /categories?_limit=1000 (180 ms) 200
[develop:backend ] [2021-12-22T22:28:09.487Z] debug GET /global?_limit=1000 (177 ms) 200
[develop:backend ] [2021-12-22T22:28:09.505Z] debug GET /uploads/percussion_f28f85d040.png (9 ms) 200
[develop:backend ] [2021-12-22T22:28:09.506Z] debug GET /uploads/strings_ef82a124b9.png (11 ms) 200
[develop:backend ] [2021-12-22T22:28:09.508Z] debug GET /uploads/guitars_3dbd0ecc11.png (14 ms) 200
[develop:backend ] [2021-12-22T22:28:09.510Z] debug GET /uploads/keys_7b00a6e36b.png (17 ms) 200
[develop:backend ] [2021-12-22T22:28:09.512Z] debug GET /uploads/placeholder_2542f85a27.png (14 ms) 200
[develop:backend ] [2021-12-22T22:28:09.581Z] debug GET /uploads/favicon_9e5295b2ea.png (2 ms) 200
[develop:backend ] [2021-12-22T22:28:09.600Z] debug GET /uploads/cordoba_classical_guitar_78d86dd410.png (5 ms) 200
[develop:backend ] [2021-12-22T22:28:09.638Z] debug GET /uploads/steinway_grand_c_227_573ead2cbb.png (2 ms) 200
[develop:backend ] [2021-12-22T22:28:09.657Z] debug GET /uploads/placeholder_2fac1d4f9f.png (8 ms) 200
[develop:backend ] [2021-12-22T22:28:09.664Z] debug GET /uploads/martin_acoustic_guitar_907b7c0102.png (2 ms) 200
[develop:backend ] [2021-12-22T22:28:09.702Z] debug GET /uploads/steinway_upright_k_132_7fc41a789d.png (9 ms) 200
[develop:backend ] [2021-12-22T22:28:09.737Z] debug GET /uploads/stradivarius_violin_b6c469c4b9.png (8 ms) 200
[develop:backend ] [2021-12-22T22:28:09.764Z] debug GET /uploads/yamaha_classical_guitar_481a557140.png (21 ms) 200
[develop:backend ] [2021-12-22T22:28:09.790Z] debug GET /uploads/yamaha_grand_piano_579f308c81.png (5 ms) 200
[develop:backend ] [2021-12-22T22:28:09.791Z] debug GET /uploads/6_piece_drum_kit_e13e1ac411.png (4 ms) 200
[develop:backend ] [2021-12-22T22:28:09.828Z] debug GET /uploads/fender_stratocaster_8df4be9c38.png (2 ms) 200
[develop:backend ] [2021-12-22T22:28:09.858Z] debug GET /uploads/4_piece_drum_kit_99b4f3e0b2.png (3 ms) 200
[develop:backend ] [2021-12-22T22:28:09.904Z] debug GET /uploads/roland_electric_drum_kit_6ea56ecfee.png (8 ms) 200
success Fetched Strapi Data - 0.913s
success Checking for changed pages - 0.001s
success source and transform nodes - 1.033s
[develop:frontend]
success building schema - 1.038s
info Total nodes: 102, SitePage nodes: 1 (use --verbose for breakdown)
success createPages - 0.792s
success Checking for changed pages - 0.000s
success createPagesStatefully - 0.170s
success update schema - 0.089s
success write out redirect data - 0.002s
success Build manifest and related icons - 0.093s
success onPostBootstrap - 0.098s
info bootstrap finished - 10.850s
success onPreExtractQueries - 0.001s
success extract queries from components - 2.039s
success write out requires - 0.006s
success run static queries - 0.083s - 4/4 48.17/s
success run page queries - 0.209s - 3/3 14.35/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
[develop:frontend]
[develop:backend ] [2021-12-22T22:28:16.207Z] debug POST /graphql (1 ms) 405
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:28:27.223Z] debug POST /graphql (1 ms) 405
[develop:backend ] [2021-12-22T22:28:32.258Z] debug POST /graphql (3 ms) 405
[develop:backend ] [2021-12-22T22:28:38.540Z] debug POST /graphql (1 ms) 405
⠀
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 - 30.227s
[develop:frontend]
success onPreExtractQueries - 0.002s
success extract queries from components - 0.402s
success write out requires - 0.002s
success run page queries - 0.110s - 1/1 9.07/s
[develop:frontend]
^C^C^C
$