Replies: 3 comments
-
Please don't spam the discussion, if you need asap help, try the shopify hydrogen discord 😄 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Was able to fix this issue with Please re-open and let us know if this does not resolved your issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
MacOS 14.4.1 (23E224)
Node v22.0.0
npm 10.5.1
@shopify/cli/3.59.1 darwin-x64 node-v22.0.0
After "npm run dev" to running the localhost:300 storefront of Hydrogen, the errors as below :
`$npm run dev
Environment variables injected into MiniOxygen:
SESSION_SECRET from local .env
PUBLIC_STORE_DOMAIN from local .env
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
➜ press h + enter to show help
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
You might have mismatching versions of React and the renderer (such as React DOM)
You might be breaking the Rules of Hooks
You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
The above error occurred in the component:
at BoxWithBorder (file:///usr/local/var/www/gitHub/hydrogenstore/node_modules/@shopify/cli-kit/dist/private/node/ui/components/Banner.js:23:26)
at Banner (file:///usr/local/var/www/gitHub/hydrogenstore/node_modules/@shopify/cli-kit/dist/private/node/ui/components/Banner.js:61:19)
at Alert (file:///usr/local/var/www/gitHub/hydrogenstore/node_modules/@shopify/cli-kit/dist/private/node/ui/components/Alert.js:7:18)
at App (file:///usr/local/var/www/gitHub/hydrogenstore/node_modules/ink/build/components/App.js:19:9)
React will try to recreate this component tree from scratch using the error boundary you provided, InternalApp.
ERROR Cannot read properties of null (reading 'useState')
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();
› Warning: Could not find ts-node at /usr/local/var/www/gitHub/hydrogenstore/node_modules/@shopify/cli/dist/index-e6f8190d.js. Please ensure that ts-node is a devDependency. Falling back to compiled source.`
Beta Was this translation helpful? Give feedback.
All reactions