'Types Error when run yarn build or tsc commands
Solution 1:[1]
You have multiple versions of react type definitions installed. Notice the two different roots of node_modules highlighted in the image below:

Fix
You need to uninstall one of them otherwise the two definitions will conflict giving errors (as you have noticed).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | basarat |

