Open NotoriousGOR opened 1 year ago
👋 This looks like a Hydrogen v1 issue. useQuery
etc are no longer part of Hydrogen 2023.1, which was released today. I'm going to transfer your issue to the correct repo.
👋 This looks like a Hydrogen v1 issue.
useQuery
etc are no longer part of Hydrogen 2023.1, which was released today. I'm going to transfer your issue to the correct repo.
Thank you and congrats @jplhomer + Shopify!
What is the location of your example repository?
No response
What version of Hydrogen are you using?
^1.5.0
What version of Remix are you using?
No response
Steps to Reproduce
So, I am using Oxygen as my hosting platform.
yarn build
or the equivalent for your package managerThe only way to fix it, for now, is to change the import statement from:
import {useQuery, useServerProps} from '@shopify/hydrogen';
To:
import * as Shopify from '@shopify/hydrogen';
Expected Behavior
It's bundled as expected and succeeds in the build process.
Actual Behavior
Fails with an error message:
'useQuery' is not exported by node_modules/@shopify/hydrogen/dist/esnext/client.js, imported by src/lib/hooks.ts