Fix: Example Not Working
trentschnee opened this issue · 0 comments
trentschnee commented
Hey @trentschnee
I cloned the latest release and copied the introductory tutorial example into a separate directory. After running npm install
and npm run develop
I am getting this error:
Error in function useColorScheme in ./node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js:37
MUI: `useColorScheme` must be called under <CssVarsProvider />
./node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js:37
35 | const value = React.useContext(ColorSchemeContext);
36 | if (!value) {
> 37 | throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`useColorScheme\` must be called under <CssVarsProvider />` : _formatMuiErrorMessage(19));
38 | }
39 | return value;
40 | };
Not sure why this is happening; shouldn't Provider.tsx
be wrapping the page with CssVarsProvider
?
Originally posted by @alexkmnsky in #11 (reply in thread)