creativetimofficial / ct-material-kit-pro-react

React version of Material Kit Pro
39 stars 12 forks source link

[Bug] Compile error on first starting the project files downloaded from my Creative Tim account #105

Closed babylon2017 closed 2 years ago

babylon2017 commented 2 years ago

Version

2.0.0

Reproduction link

https://www.creative-tim.com/learning-lab/react/quick-start/material-kit/

Operating System

Mac OS

Device

desktop

Browser & Version

Chrome 104.0.5112.79

Steps to reproduce

  1. Download React project file
  2. yarn install
  3. yarn start

    What is expected?

    a working website as described in https://www.creative-tim.com/learning-lab/react/quick-start/material-kit/

    What is actually happening?

    Compile error. Multiple error messages of the type: "Prop type object is forbidden"

    Screenshot 2022-08-07 at 07 14 58

This error message is spread over several files


Solution

Additional comments

SeizeTheFuture commented 2 years ago

I had the same issue. I was able to resolve it by replacing all those instances of PropTypes.object with the following: PropTypes.objectOf(PropTypes.shape()). Best of luck.