strapi / strapi-starter-gatsby-catalog

Strapi Starter Gatsby Catalog
strapi-starter-gatsby-catalog-strapijs.vercel.app
MIT License
28 stars 16 forks source link

GraphQL error while npx create-strapi-starter #20

Open m0xai opened 3 years ago

m0xai commented 3 years ago

I have an error when i run npx create-strapi-starter my-project gatsby-catalog on my terminal on MacOS. Strapi backend working without problem but frontend on localhost:8000 not loading.

Here is the complete Terminal output:

? Choose your installation type Quickstart (recommended)
Creating a quickstart project.
Creating a new Strapi application at /Users/m0xai/my-project/backend.
Creating files.
Installing strapi/strapi-template-catalog template.
Dependencies installed successfully.

Your application was created at /Users/m0xai/my-project/backend.

Available commands in your project:

  npm run develop
  Start Strapi in watch mode.

  npm run start
  Start Strapi without watch mode.

  npm run build
  Build Strapi admin panel.

  npm run strapi
  Display all available commands.

You can start by doing:

  cd /Users/m0xai/my-project/backend
  npm run develop

Creating Strapi starter frontend at /Users/m0xai/my-project/frontend.
Installing strapi/strapi-starter-gatsby-catalog starter
Dependencies installed successfully.
Dependencies installed successfully.
Starting the app

> my-project@0.0.0 develop
> cross-env FORCE_COLOR=1 npm-run-all -l -p develop:*

[develop:backend ] 
[develop:backend ] > my-project@0.0.0 develop:backend
[develop:backend ] > npm run --prefix backend develop
[develop:backend ] 
[develop:frontend] 
[develop:frontend] > my-project@0.0.0 develop:frontend
[develop:frontend] > wait-on http://localhost:1337/admin && npm run --prefix frontend develop
[develop:frontend] 
[develop:backend ] 
[develop:backend ] > backend@0.1.0 develop
[develop:backend ] > strapi develop
[develop:backend ] 
[develop:backend ] Building your admin UI with development configuration ...
[develop:backend ] ℹ Compiling Webpack
[develop:backend ] ✔ Webpack: Compiled successfully in 1.12m
[develop:backend ] [2021-10-14T07:11:33.535Z] info File created: /Users/m0xai/my-project/backend/extensions/users-permissions/config/jwt.js
[develop:backend ] 
[develop:backend ]  Project information
[develop:backend ] 
[develop:backend ] ┌────────────────────┬──────────────────────────────────────────────────┐
[develop:backend ] │ Time               │ Thu Oct 14 2021 10:11:47 GMT+0300 (GMT+03:00)    │
[develop:backend ] │ Launched in        │ 26010 ms                                         │
[develop:backend ] │ Environment        │ development                                      │
[develop:backend ] │ Process PID        │ 5355                                             │
[develop:backend ] │ Version            │ 3.6.8 (node v16.10.0)                            │
[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-10-14T07:11:48.024Z] debug HEAD /admin (15 ms) 200
[develop:backend ] [2021-10-14T07:11:48.539Z] debug HEAD /admin (6 ms) 200
[develop:backend ] [2021-10-14T07:11:48.549Z] info ⏳ Opening the admin panel...
[develop:backend ] [2021-10-14T07:11:48.705Z] error Failed to open Google Chrome with AppleScript
[develop:frontend] 
[develop:frontend] > gatsby-starter-default@0.1.0 develop
[develop:frontend] > gatsby develop --open
[develop:frontend] 
[develop:backend ] [2021-10-14T07:11:54.430Z] debug GET /admin (2 ms) 200
[develop:backend ] [2021-10-14T07:11:54.683Z] debug GET /admin/runtime~main.fc0259cb.js (29 ms) 200
[develop:backend ] [2021-10-14T07:11:54.698Z] debug GET /admin/main.28f1972d.chunk.js (2 ms) 200
[develop:backend ] [2021-10-14T07:11:59.763Z] debug GET /admin/init (5 ms) 200
[develop:backend ] [2021-10-14T07:12:00.718Z] debug GET /favicon.ico (0 ms) 200
[develop:backend ] [2021-10-14T07:12:01.952Z] debug GET /admin/07109cdae9f760e8d97c89788c9dc9df.png (3 ms) 200
[develop:backend ] [2021-10-14T07:12:02.362Z] debug GET /admin/842e7845f3f8e943ff712a39617b6b70.svg (2 ms) 200
[develop:backend ] [2021-10-14T07:12:02.681Z] debug GET /admin/75614cfcfedd509b1f7ac1c26c53bb7f.woff2 (3 ms) 200
[develop:backend ] [2021-10-14T07:12:02.700Z] debug GET /admin/a6069540692725c247f13984a9598a92.woff2 (5 ms) 200
[develop:backend ] [2021-10-14T07:12:02.704Z] debug GET /admin/21b3848a32fce5b0f5014948186f6964.woff2 (3 ms) 200
[develop:backend ] [2021-10-14T07:12:06.825Z] debug GET index.html (10 ms) 200
[develop:backend ] [2021-10-14T07:12:07.050Z] debug GET /assets/images/logo_login.png (10 ms) 200
[develop:backend ] [2021-10-14T07:12:07.066Z] debug GET /assets/images/group_people_1.png (7 ms) 200
[develop:backend ] [2021-10-14T07:12:07.070Z] debug GET /assets/images/group_people_2.png (8 ms) 200
[develop:backend ] [2021-10-14T07:12:07.072Z] debug GET /assets/images/group_people_3.png (5 ms) 200
[develop:frontend] /Users/m0xai/my-project/frontend/node_modules/gatsby-recipes/node_modules/graphq
[develop:frontend] l/jsutils/instanceOf.js:29
[develop:frontend]       throw new Error("Cannot use ".concat(className, " \"").concat(value, "\"
[develop:frontend] from another module or realm.\n\nEnsure that there is only one instance of
[develop:frontend] \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\"
[develop:frontend]  are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure
[develop:frontend]  only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version
[develop:frontend] -resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time
[develop:frontend] since different\nversions may have different capabilities and behavior. The data
[develop:frontend]  from one\nversion used in the function from another could produce confusing
[develop:frontend] and\nspurious results."));
[develop:frontend]       ^
[develop:frontend] 
[develop:frontend] Error: Cannot use GraphQLInputObjectType "FileInput" from another module or
[develop:frontend] realm.
[develop:frontend] 
[develop:frontend] Ensure that there is only one instance of "graphql" in the node_modules
[develop:frontend] directory. If different versions of "graphql" are the dependencies of other
[develop:frontend] relied on modules, u
se "resolutions" to ensure only one version is installed.
[develop:frontend] 
[develop:frontend] https://yarnpkg.com/en/docs/selective-version-resolutions
[develop:frontend] 
[develop:frontend] Duplicate "graphql" modules cannot be used at the same time since different
[develop:frontend] versions may have different capabilities and behavior. The data from one
[develop:frontend] version used in the function from another could produce confusing and
[develop:frontend] spurious results.
[develop:frontend]     at instanceOf (/Users/m0xai/my-project/frontend/node_modules/gatsby-recipes/
[develop:frontend] node_modules/graphql/jsutils/instanceOf.js:29:13)
[develop:frontend]     at isInputObjectType (/Users/m0xai/my-project/frontend/node_modules/gatsby-r
[develop:frontend] ecipes/node_modules/graphql/type/definition.js:174:34)
[develop:frontend]     at collectReferencedTypes (/Users/m0xai/my-project/frontend/node_modules/gat
[develop:frontend] sby-recipes/node_modules/graphql/type/schema.js:375:50)
[develop:frontend]     at collectReferencedTypes (/Users/m0xai/my-project/frontend/node_modules/gat
[develop:frontend] sby-recipes/node_modules/graphql/type/schema.js:372:11)
[develop:frontend]     at new GraphQLSchema (/Users/m0xai/my-project/frontend/node_modules/gatsby-r
[develop:frontend] ecipes/node_modules/graphql/type/schema.js:157:7)
[develop:frontend]     at Object.<anonymous> (/Users/m0xai/my-project/frontend/node_modules/gatsby-
[develop:frontend] recipes/dist/graphql-server/server.js:21869:18)
[develop:frontend]     at Module._compile (node:internal/modules/cjs/loader:1101:14)
[develop:frontend]     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
[develop:frontend]     at Module.load (node:internal/modules/cjs/loader:981:32)
[develop:frontend]     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[develop:frontend] 
[develop:frontend] 
[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.490s
success load plugins - 6.396s
success onPreInit - 0.212s
success initialize cache - 0.051s
success copy gatsby files - 0.650s
success onPreBootstrap - 0.063s

[develop:frontend]  ERROR #11321  PLUGIN
[develop:frontend] 
[develop:frontend] "gatsby-transformer-sharp" threw an error while running the
[develop:frontend] createSchemaCustomization lifecycle:
[develop:frontend] 
[develop:frontend] Cannot use GraphQLScalarType "JSON" from another module or realm.
[develop:frontend] 
[develop:frontend] Ensure that there is only one instance of "graphql" in the node_modules
[develop:frontend] directory. If different versions of "graphql" are the dependencies of other
[develop:frontend] relied on modules, use "resolutions" to ensure only one version is installed.
[develop:frontend] 
[develop:frontend] https://yarnpkg.com/en/docs/selective-version-resolutions
[develop:frontend] 
[develop:frontend] Duplicate "graphql" modules cannot be used at the same time since different
[develop:frontend] versions may have different capabilities and behavior. The data from one
[develop:frontend] version used in the function from another could produce confusing and
[develop:frontend] spurious results.
[develop:frontend] 

[develop:frontend] 
[develop:frontend]   Error: Cannot use GraphQLScalarType "JSON" from another module or realm.
[develop:frontend]   Ensure that there is only one instance of "graphql" in the node_modules
[develop:frontend]   directory. If different versions of "graphql" are the dependencies of other
[develop:frontend]   relied on modules, use "resolutions" to ensure only one version is installed.
[develop:frontend]   https://yarnpkg.com/en/docs/selective-version-resolutions
[develop:frontend]   Duplicate "graphql" modules cannot be used at the same time since different
[develop:frontend]   versions may have different capabilities and behavior. The data from one
[develop:frontend]   version used in the function from another could produce confusing and
[develop:frontend]   spurious results.
[develop:frontend]   
[develop:frontend]   - customize-schema.js:485 imageNodeType
[develop:frontend]     [frontend]/[gatsby-transformer-sharp]/customize-schema.js:485:11
[develop:frontend]   
[develop:frontend]   - customize-schema.js:644 createFields
[develop:frontend]     [frontend]/[gatsby-transformer-sharp]/customize-schema.js:644:21
[develop:frontend]   
[develop:frontend]   - customize-schema.js:842 Object.module.exports [as createSchemaCustomization]
[develop:frontend]     [frontend]/[gatsby-transformer-sharp]/customize-schema.js:842:13
[develop:frontend]   
[develop:frontend]   - api-runner-node.js:434 runAPI
[develop:frontend]     [frontend]/[gatsby]/src/utils/api-runner-node.js:434:22
[develop:frontend]   
[develop:frontend]   - api-runner-node.js:585 Promise.catch.decorateEvent.pluginName
[develop:frontend]     [frontend]/[gatsby]/src/utils/api-runner-node.js:585:13
[develop:frontend]   
[develop:frontend]   - debuggability.js:384 Promise._execute
[develop:frontend]     [frontend]/[bluebird]/js/release/debuggability.js:384:9
[develop:frontend]   
[develop:frontend]   - promise.js:518 Promise._resolveFromExecutor
[develop:frontend]     [frontend]/[bluebird]/js/release/promise.js:518:18
[develop:frontend]   
[develop:frontend]   - promise.js:103 new Promise
[develop:frontend]     [frontend]/[bluebird]/js/release/promise.js:103:10
[develop:frontend]   
[develop:frontend]   - api-runner-node.js:583 
[develop:frontend]     [frontend]/[gatsby]/src/utils/api-runner-node.js:583:16
[develop:frontend]   
[develop:frontend]   - util.js:16 tryCatcher
[develop:frontend]     [frontend]/[bluebird]/js/release/util.js:16:23
[develop:frontend]   
[develop:frontend] 
success createSchemaCustomization - 0.308s
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-10-14T07:12:43.931Z] debug GET /products?_limit=1000 (207 ms) 200
[develop:backend ] [2021-10-14T07:12:43.954Z] debug GET /categories?_limit=1000 (220 ms) 200

[develop:frontend]  ERROR 
[develop:frontend] 
[develop:frontend] (node:5388) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is
[develop:frontend] deprecated
[develop:frontend] (Use `node --trace-deprecation ...` to show where the warning was created)
[develop:frontend] 
[develop:frontend] 
[develop:backend ] [2021-10-14T07:12:44.087Z] debug GET /uploads/keys_c870b5b2ad.png (14 ms) 200
[develop:backend ] [2021-10-14T07:12:44.089Z] debug GET /uploads/guitars_334087e9df.png (14 ms) 200
[develop:backend ] [2021-10-14T07:12:44.092Z] debug GET /uploads/strings_59fceacf42.png (13 ms) 200
[develop:backend ] [2021-10-14T07:12:44.093Z] debug GET /uploads/percussion_5ac0dae360.png (11 ms) 200
[develop:backend ] [2021-10-14T07:12:44.094Z] debug GET /uploads/placeholder_86c377b8d8.png (11 ms) 200
[develop:backend ] [2021-10-14T07:12:44.341Z] debug GET /uploads/favicon_70e027e1fd.png (6 ms) 200
[develop:backend ] [2021-10-14T07:12:44.401Z] debug GET /uploads/cordoba_classical_guitar_3217b74265.png (3 ms) 200
[develop:backend ] [2021-10-14T07:12:44.439Z] debug GET /uploads/martin_acoustic_guitar_a430046dfd.png (1 ms) 200
[develop:backend ] [2021-10-14T07:12:44.554Z] debug GET /uploads/yamaha_classical_guitar_644fdef18c.png (6 ms) 200
[develop:backend ] [2021-10-14T07:12:44.620Z] debug GET /uploads/placeholder_3cd29fdc9c.png (15 ms) 200
[develop:backend ] [2021-10-14T07:12:44.690Z] debug GET /uploads/fender_stratocaster_e0dc42c74c.png (5 ms) 200
[develop:backend ] [2021-10-14T07:12:44.846Z] debug GET /uploads/steinway_grand_c_227_c7c8b8ee1d.png (3 ms) 200
[develop:backend ] [2021-10-14T07:12:44.925Z] debug GET /uploads/steinway_upright_k_132_efa5e9aef9.png (2 ms) 200
[develop:backend ] [2021-10-14T07:12:45.085Z] debug GET /uploads/yamaha_grand_piano_6ca18f096b.png (31 ms) 200
[develop:backend ] [2021-10-14T07:12:45.142Z] debug GET /uploads/stradivarius_violin_89aa8b21ed.png (3 ms) 200
[develop:backend ] [2021-10-14T07:12:45.432Z] debug GET /uploads/6_piece_drum_kit_0777ce17f5.png (1 ms) 200
[develop:backend ] [2021-10-14T07:12:45.584Z] debug GET /uploads/4_piece_drum_kit_fd816a2a00.png (2 ms) 200
[develop:backend ] [2021-10-14T07:12:45.637Z] debug GET /uploads/roland_electric_drum_kit_3c56d8e42c.png (8 ms) 200
[develop:backend ] [2021-10-14T07:12:45.726Z] debug GET /uploads/electric_drum_kit_27c44b58d9.png (1success Fetched Strapi Data - 2.708s
success Checking for changed pages - 0.004s
success source and transform nodes - 2.891s

[develop:frontend]  ERROR 
[develop:frontend] 
[develop:frontend] Missing onError handler for invocation 'building-schema', error was 'Error:
[develop:frontend] Cannot create as TypeComposer the following value:
[develop:frontend]   Date.'. Stacktrace was 'Error: Cannot create as TypeComposer the following
[develop:frontend] value:
[develop:frontend]   Date.
[develop:frontend]     at SchemaComposer.createTempTC (/Users/m0xai/my-project/frontend/node_module
[develop:frontend] s/graphql-compose/lib/SchemaComposer.js:463:11)
[develop:frontend]     at SchemaComposer.createTC (/Users/m0xai/my-project/frontend/node_modules/gr
[develop:frontend] aphql-compose/lib/SchemaComposer.js:426:84)
[develop:frontend]     at SchemaComposer.add (/Users/m0xai/my-project/frontend/node_modules/graphql
[develop:frontend] -compose/lib/SchemaComposer.js:715:21)
[develop:frontend]     at createSchemaComposer (/Users/m0xai/my-project/frontend/node_modules/gatsb
[develop:frontend] y/src/schema/schema-composer.js:16:18)
[develop:frontend]     at build (/Users/m0xai/my-project/frontend/node_modules/gatsby/src/schema/in
[develop:frontend] dex.js:104:26)
[develop:frontend]     at buildSchema (/Users/m0xai/my-project/frontend/node_modules/gatsby/src/ser
[develop:frontend] vices/build-schema.ts:19:3)'
[develop:frontend] 
[develop:frontend] 
valentina-paniza commented 3 years ago

I'm having the same issue!

m0xai commented 3 years ago

Sorry for late update but I solve this using nodejs LTS version, instead Current version..

markkaylor commented 3 years ago

@valentina-paniza could you also try using node LTS?