Shopify / hydrogen

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

New Project Store Hydrogen with ERROR Cannot read properties of null (reading 'useState') #2046

Closed HeisUser closed 3 weeks ago

HeisUser commented 3 weeks ago

MacOS 14.4.1 (23E224) Node v22.0.0 npm 10.5.1 @shopify/cli/3.59.1 darwin-x64 node-v22.0.0

Due on Hydrogen Shopify New Installation with "$ npm create @shopify/hydrogen@latest" the system keeps showing the error as below!

I had tried to other method "$ shopify hydrogen init --mock-shop --path custom-hydrogens --language js --markets subdomains --shortcut --verbose" to create mock-shop of Hydrogen, the same error happening as below!

 /~/.npm/_npx/e1eac94ad41cc36f/node_modules/@shopify/cli-kit/node_modules/react/cjs/react.development.js:1622:21

 1619: }
 1620: function useState(initialState) {
 1621:   var dispatcher = resolveDispatcher();
 1622:   return dispatcher.useState(initialState);
 1623: }
 1624: function useReducer(reducer, initialArg, init) {
 1625:   var dispatcher = resolveDispatcher();

 - useState (/~/.npm/_npx/e1eac94ad41cc36f/node_modules/@shopify/cli-kit/node_modules/react/cjs/react.development.js:1622:21)
 - usePrompt (file:///~/.npm/_npx/e1eac94ad41cc36f/node_modules/@shopify/cli-kit/dist/private/node/ui/hooks/use-prompt.js:11:43)
 - SelectPrompt (file:///~/.npm/_npx/e1eac94ad41cc36f/node_modules/@shopify/cli-kit/dist/private/node/ui/components/SelectPrompt.js:12:64)
 - renderWithHooks (/~/.npm/_npx/e1eac94ad41cc36f/node_modules/react-reconciler/cjs/react-reconciler.development.js:6659:18)
 - mountIndeterminateComponent (/~/.npm/_npx/e1eac94ad41cc36f/node_modules/react-reconciler/cjs/react-reconciler.development.js:11276:13)
 - beginWork (/~/.npm/_npx/e1eac94ad41cc36f/node_modules/react-reconciler/cjs/react-reconciler.development.js:12799:16)
 - beginWork$1 (/~/.npm/_npx/e1eac94ad41cc36f/node_modules/react-reconciler/cjs/react-reconciler.development.js:19608:14)
 - performUnitOfWork (/~/.npm/_npx/e1eac94ad41cc36f/node_modules/react-reconciler/cjs/react-reconciler.development.js:18742:12)
 - workLoopSync (/~/.npm/_npx/e1eac94ad41cc36f/node_modules/react-reconciler/cjs/react-reconciler.development.js:18648:5)
 - renderRootSync (/~/.npm/_npx/e1eac94ad41cc36f/node_modules/react-reconciler/cjs/react-reconciler.development.js:18616:7)

Originally posted by @HeisUser in https://github.com/Shopify/hydrogen/discussions/2044

jamalsoueidan commented 3 weeks ago

Please look into https://github.com/Shopify/hydrogen/issues/2040

HeisUser commented 3 weeks ago

Please look into #2040

Thank You~

graygilmore commented 3 weeks ago

Closing in favor of https://github.com/Shopify/hydrogen/issues/2040

HeisUser commented 3 weeks ago

Closing in favor of #2040

Are you mean close this post? I am newbie on GitHub and as a programmer.

graygilmore commented 3 weeks ago

Yes, I've closed this issue as it's a duplicate of #2040 so you should follow along with that issue instead.

HeisUser commented 3 weeks ago

Yes, I've closed this issue as it's a duplicate of #2040 so you should follow along with that issue instead.

Sure.. I was find the "Delete" feature on GitHub but I didn't at anywhere. Please close this post for me. Thank you with your assistance .