Open Khoby-790 opened 1 year ago
Had the same problem. My application has the following dependencies:
Package | Version |
---|---|
react | ^18.2.0 |
react-dom | ^18.2.0 |
react-scripts | ^5.0.1 |
react-transition-group | ^4.4.2 |
@types/node | ^18.7.18 |
@types/react | ^18.0.0 |
@types/react-dom | ^18.0.0 |
@types/react-transition-group | ^4.4.4 |
typescript | ^4.8.3 |
I've tried to upgrade versions of @types/*
packages using yarn
specifying the latest versions of ones:
yarn upgrade react@^18.2.0 react-dom@^18.2.0 @types/react@^18.0.21 @types/react-dom@^18.0.6 react-transition-group@^4.4.5 @types/react-transition-group@^4.4.5
But it did not work. So, after that i tried to update all packages with yarn upgrade
command without any parameter:
yarn upgrade
It helped me. May be it will help you too
I have the same problem, I had to add resolutions property in my package.json with 17.0.38 version of @types/react
I experienced the same issue. Messing around with dependency versions didn't help me. Turns out in my case the issue was caused by conflicting type definitions for JSX.Element
between React and Vue, see: https://github.com/vuejs/core/issues/1033
I forced my app to compile by following the recommendation from https://github.com/vuejs/core/issues/1033#issuecomment-1176412645 and applying a local patch to Vue that removes the conflicting type (thankfully I only needed TypeScript to work with React in my project).
I'm having the same issue after running yarn upgrade. I'm using react 18, and adding resolutions property didn't work
+1
Good old npx yarn-deduplicate && yarn
helped me.
Otherwise.. delete your lock file and do a fresh install :)
yarn dedupe
for v3+