Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to latest Hydrogen version and CLI breaks build and codegen #2041

Closed
DennisKraaijeveld opened this issue Apr 26, 2024 · 2 comments
Closed

Comments

@DennisKraaijeveld
Copy link

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.4.1

What version of Remix are you using?

2.8.0

Steps to Reproduce

Run yarn codegen or yarn build

Expected Behavior

Expect it to be running the codegen and build like it was before

Actual Behavior

❯ yarn codegen
yarn run v1.22.21
$ shopify hydrogen codegen
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:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. 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.
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:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. 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 <BoxWithBorder> component:

    at BoxWithBorder (file:///Users/dennis/Developer/Private/viv-sanity-hydrogen/node_modules/@shopify/cli-kit/dist/private/node/ui/components/Banner.js:23:26)
    at Banner (file:///Users/dennis/Developer/Private/viv-sanity-hydrogen/node_modules/@shopify/cli-kit/dist/private/node/ui/components/Banner.js:61:19)
    at FatalError (file:///Users/dennis/Developer/Private/viv-sanity-hydrogen/node_modules/@shopify/cli-kit/dist/private/node/ui/components/FatalError.js:9:23)
    at App (file:///Users/dennis/Developer/Private/viv-sanity-hydrogen/node_modules/@shopify/cli-kit/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 'useContext')

 node_modules/@shopify/cli-kit/node_modules/react/cjs/react.development.js:1618:21
@jamalsoueidan
Copy link
Contributor

jamalsoueidan commented Apr 26, 2024

#2040 Same as

@graygilmore
Copy link
Contributor

closing in favor of #2040

@graygilmore graygilmore closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants