I’m getting these errors when trying to integrate Chakra UI into my React application using Vite.
Uncaught TypeError: sys is undefined
ChakraProvider provider.js:15
The above error occurred in the <ChakraProvider> component:
ChakraProvider@https://localhost:5173/node_modules/.vite/deps/@chakra-ui_react.js?v=b3e29175:2973:36
This is my App.jsx, error only occurs once I add the ChakraProvider
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { ChakraProvider } from '@chakra-ui/react';
import App from "./App.jsx";
import "./index.css";
createRoot(document.getElementById("root")).render(
<StrictMode>
<ChakraProvider>
<App />
</ChakraProvider>
</StrictMode>
);
The rest of my application is just from the Visual Studio React and ASP.NET Core template and behaves without any issues.
You need to sign in to view this answers
Leave feedback about this