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.
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
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)
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?
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.