I’ve attached a screenshot, these are a few of the type errors I’m getting. No clue how to fix this, please help lol.
If you cat
your yarn.lock
file you will probably find multiple versions of react.
Fix it by defining a resolutions
block, something like:
"resolutions": {
"@types/react": "^your.version.here"
}
If you have your node_modules
cached you should up the version and have it be regenerated. Furthermore, what is your cache key for this if you use cache?
Lastly you could try to add yarn upgrade @types/react
. This has fixed the issue for me before. Though a resolutions
block is a nice thing to have for the future.
(for one pesky project I had to delete yarn.lock
and node_modules
but this is a last resort.)
Good luck!