dry-scarletD
Refine2y ago
3 replies
dry-scarlet

Example with NX, Vite, React Router & Chakra UI

Hi! I'd like to start building our company's new CRM with Refine within an NX monorepo . I've tried to get this example running: https://github.com/refinedev/refine/tree/master/examples/auth-chakra-ui, but I get the error:

Uncaught Error: useLocation() may be used only in the context of a <Router> component.
    at invariant (@refinedev_react-router-v6.js?v=48eae912:806:11)
    at useLocation (@refinedev_react-router-v6.js?v=48eae912:1293:34)
    at parse (@refinedev_react-router-v6.js?v=48eae912:2565:53)
    at useParse (chunk-ZT2JZPDT.js?v=48eae912:9476:132)
    at useParsed (chunk-ZT2JZPDT.js?v=48eae912:9479:11)
    at Authenticated (chunk-ZT2JZPDT.js?v=48eae912:10274:121)
    at renderWithHooks (chunk-ECX7LEHP.js?v=48eae912:12171:26)
    at mountIndeterminateComponent (chunk-ECX7LEHP.js?v=48eae912:14921:21)
    at beginWork (chunk-ECX7LEHP.js?v=48eae912:15902:22)
    at HTMLUnknownElement.callCallback2 (chunk-ECX7LEHP.js?v=48eae912:3674:22)


Any idea what could be the problem?
Was this page helpful?