Hydrogen framework error: Something's wrong here

Topic summary

Users encounter a “Something’s wrong here…” error when running Hydrogen framework projects with npm run dev on Ubuntu. The browser displays the error while the command line suggests adding showQueryTiming to the configuration, which doesn’t resolve the issue.

Common error patterns:

  • “Router hooks and component must be used within a component”
  • “Could not find client component” errors
  • Issues specifically when importing ProductDetails.client.jsx component
  • Vite connection closing unexpectedly

Proposed solutions:

  • Upgrade Node.js to v16.17.0 (LTS) or higher; latest recommendation is Node 20+ for 2024/25
  • Use yarn dev --force instead of npm, as the issue may be npm-related
  • Remove default from component exports (change export default function to export function)
  • Verify vite.config.js configuration (screenshots provided by users)
  • Use nvm to manage Node versions if system-level upgrades aren’t possible

Status: Mixed results reported. Some users resolved the issue with Node upgrades or yarn, while others with identical configurations continue experiencing problems. A related GitHub issue (#2090) tracks ongoing cases.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

After Hydrogen framework installation with react run command “npm run dev” getting error:

using OS: Ubuntu

in browser : "Something’s wrong here…

in command line prompt: Add the showQueryTiming property to your Hydrogen configuration to see more information

even i have try to added showQueryTiming: true, in hydrogen.config.js file but not resolved. please help here.

3 Likes

I can’t offer support, just here to say I am facing the same problem. I’ve been trying to follow along with the hydrogen tutorial here and when I get to the product page section here I am getting the same error. The console has a lot to say about the error, none of which I understand:

(EDIT for clarification - it’s specifically when importing the ProductDetails.client.jsx component into the [handle].server.jsx route - all fine up to then)

Uncaught Error: Router hooks and  component must be used within a
1 Like

Encountered the same issue, and fixed it by upgrading Node.js to 16.17.0 (LTS)

Meanwhile the message “Add the showQueryTiming property…” appears to be a helper message following each <Suspense />

3 Likes

Hi Mingyeungs, thanks for your response.

i have try to change with node version but still getting same issue. in console it show vite connect close

1 Like

My vite.config.js file is look like this :

2 Likes

Also on v16.17.0

➜  hydrogen-test-app node -v
v16.17.0

I still cannot seem to find a solution on how to get the ProductDetails.client.jsx to work. It seems that there is no error on node side but on react side:

Uncaught Error: Could not find client component ProductDetails-LTEzMzg4NTkwNTc
    at importClientComponent (:3000/node_modules/@shopify/hydrogen/vendor/react-server-dom-vite/esm/react-server-dom-vite.js?v=12dba7e6:90:17)
    at preloadModule (:3000/node_modules/@shopify/hydrogen/vendor/react-server-dom-vite/esm/react-server-dom-vite.js?v=12dba7e6:124:17)
    at resolveModule (:3000/node_modules/@shopify/hydrogen/vendor/react-server-dom-vite/esm/react-server-dom-vite.js?v=12dba7e6:445:3)
    at processFullRow (:3000/node_modules/@shopify/hydrogen/vendor/react-server-dom-vite/esm/react-server-dom-vite.js?v=12dba7e6:503:9)
    at processBinaryChunk (:3000/node_modules/@shopify/hydrogen/vendor/react-server-dom-vite/esm/react-server-dom-vite.js?v=12dba7e6:553:5)
    at progress (:3000/node_modules/@shopify/hydrogen/vendor/react-server-dom-vite/esm/react-server-dom-vite.js?v=12dba7e6:606:5)

Any help would be appreciated please.

1 Like

I am facing the same problem.

Node: v16.17.1

Uncaught Error: Router hooks and component must be used within a component.

@shopify/hydrogen”: “^1.4.2”,
“react”: “^18.2.0”,
“react-dom”: “^18.2.0”

1 Like

I fixed the errors by removing the ‘default’

export default function ProductDetails({ product })

so it becomes

export function ProductDetails({ product }) {

Hope that works for you!

Hi. I’m experiencing the same error. Unfortunately none of the above solutions didn’t help. Hydrogen tutorial course users report same issue. Have you found anything so far?

Hi. Did you manage to find a solution? I have the same and apparently other hydrogen+shopify devs: https://github.com/Shopify/hydrogen/issues/2090

solved. my vite.config.js

2 Likes

Thanks. My config is the same, but the issue pursues unfortunately.

Hi there. Could you please tell where did you find this solution? Because I wanted to know what this code does. Thanks!

this can be fixed. it’s an issue with npm itself.

use yarn to run the hydrogen project.

yarn dev --force

This issue is more than likely caused by outdated node versions, The current setup in 2024/25 is node 20+, upgrade your installed version and it’ll be fine. If you can’t at the system level, use nvm to manage the node version at the user level.