devias-io / material-kit-react

React Dashboard made with Material UI’s components. Our pro template contains features like TypeScript version, authentication system with Firebase and Auth0 plus many other
http://material-kit-react.devias.io
MIT License
5.37k stars 2.46k forks source link

Demo has error #132

Closed breakline87 closed 1 year ago

breakline87 commented 2 years ago

I cloned the repo, ran npm install then ran it with npm run dev, then I get this error on localhost:3000:

Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.

TypeError: Cannot read properties of null (reading 'useContext') at Object.useContext (C:\Users\User\Workspace5\material-kit-react\node_modules\react\cjs\react.development.js:1618:21) at Html (webpack-internal:///./node_modules/next/dist/pages/_document.js:643:106) at renderWithHooks (c:\Users\User\Workspace5\material-kit-react\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5661:16) at renderIndeterminateComponent (c:\Users\User\Workspace5\material-kit-react\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5734:15) at renderElement (c:\Users\User\Workspace5\material-kit-react\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5949:7) at renderNodeDestructiveImpl (c:\Users\User\Workspace5\material-kit-react\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:6107:11) at renderNodeDestructive (c:\Users\User\Workspace5\material-kit-react\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:6079:14) at finishClassComponent (c:\Users\User\Workspace5\material-kit-react\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5691:3) at renderClassComponent (c:\Users\User\Workspace5\material-kit-react\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5699:3) at renderElement (c:\Users\User\Workspace5\material-kit-react\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5946:7)

npm version is 8.19.2