Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.36k stars 261 forks source link

Hydrogen quickstart is not working properly #2371

Open csommadev opened 1 month ago

csommadev commented 1 month ago

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2024.7.2

What version of Remix are you using?

-

Steps to Reproduce

I have just run the first command to kick off the project with Hydrogen from the official link https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started:

npm create @shopify/hydrogen@latest -- --quickstart

I tried with both multiple node.js version and multiple hydrogen version We tried from two different MAC OSX but it shouldn't be related to this

What could it be?

Expected Behavior

Working smoothly since it should be a standard template

Actual Behavior

[Codegen] Failed to load schema from /Users/---/Library/CloudStorage/----/Documents/Projects/shopify-poc/hydrogen-quickstart/ │ │ node_modules/@shopify/hydrogen/dist/storefront.schema.json: │ │ │ │ Unable to find any GraphQL type definitions for the following pointers: │ │ - node_modules/@shopify/hydrogen/dist/storefront.schema.json │ │ Error: │ │ Unable to find any GraphQL type definitions for the following pointers: │ │ - node_modules/@shopify/hydrogen/dist/storefront.schema.json │ │ at prepareResult │ │ (node_modules/@graphql-tools/load/cjs/load-typedefs.js:82:15) │ │ at loadTypedefs │ │ (node_modules/@graphql-tools/load/cjs/load-typedefs.js:40:20) │ │ at process.processTicksAndRejections │ │ (node:internal/process/task_queues:95:5) │ │ at async loadSchema (node_modules/@graphql-tools/load/cjs/schema.js:15:21) │ │ at async loadSchema (node_modules/@graphql-codegen/cli/cjs/load.js:36:24) │ │ at async node_modules/@graphql-codegen/cli/cjs/codegen.js:190:69 │ │ at async node_modules/@graphql-codegen/cli/cjs/codegen.js:189:56 │ │ at async node_modules/@graphql-codegen/cli/cjs/codegen.js:66:17 │ │ at async Task.run (node_modules/listr2/dist/index.cjs:979:11) │ │ at async node_modules/p-map/index.js:57:22 │ │ GraphQL Code Generator supports: │ │ - ES Modules and CommonJS exports (export as default or named export │ │ "schema") │ │ - Introspection JSON File │ │ - URL of GraphQL endpoint │ │ - Multiple files with type definitions (glob expression) │ │ - String in config file │ │ Try to use one of above options and run codegen again. │ │ Failed to load schema from │ │ node_modules/@shopify/hydrogen/dist/customer-account.schema.json: │ │ Unable to find any GraphQL type definitions for the following pointers: │ │ - node_modules/@shopify/hydrogen/dist/customer-account.schema.json │ │ Error: │ │ Unable to find any GraphQL type definitions for the following pointers: │ │ - node_modules/@shopify/hydrogen/dist/customer-account.schema.json │ │ at prepareResult │ │ (node_modules/@graphql-tools/load/cjs/load-typedefs.js:82:15) │ │ at loadTypedefs │ │ (node_modules/@graphql-tools/load/cjs/load-typedefs.js:40:20) │ │ at process.processTicksAndRejections │ │ (node:internal/process/task_queues:95:5) │ │ at async loadSchema (node_modules/@graphql-tools/load/cjs/schema.js:15:21) │ │ at async loadSchema (node_modules/@graphql-codegen/cli/cjs/load.js:36:24) │ │ at async node_modules/@graphql-codegen/cli/cjs/codegen.js:190:69 │ │ at async node_modules/@graphql-codegen/cli/cjs/codegen.js:189:56 │ │ at async node_modules/@graphql-codegen/cli/cjs/codegen.js:66:17 │ │ at async Task.run (node_modules/listr2/dist/index.cjs:979:11) │ │ at async node_modules/p-map/index.js:57:22 │ │ GraphQL Code Generator supports: │ │ - ES Modules and CommonJS exports (export as default or named export │ │ "schema") │ │ - Introspection JSON File │ │ - URL of GraphQL endpoint │ │ - Multiple files with type definitions (glob expression) │ │ - String in config file │ │ Try to use one of above options and run codegen again.

tassawarr commented 1 month ago

cant you try on a windows laptop or newer macOS version. it seems to be working on my end. though we tried it 10 times in a single day on different OS's. we had the same issues months ago. also we're having a different issue right now.

Elefant9477 commented 3 weeks ago

Hydrogen quickstart must be unavailable for MacOS at the moment and I know it's quite not strange since mostly everyone knows the bug thing. I just started coding so I'm not yet an expert, but I think you could check again the core contents, they may not synced.

csommadev commented 2 weeks ago

We tried from a Windows Machine but we are getting the same error. It makes sense since it should work on Node. We retried from MacOS but it didn't work again..

Elefant9477 commented 2 weeks ago

Try on Linux..? I think it would work.