If you know how to fix the issue, make a pull request instead.
@types/xxxx package and had problems.Definitions by: in index.d.ts) so they can respond.may be repeatedly dependent on @react-native
"dependencies": {
"@types/react": "*",
"@types/react-native": "*"
}
and

and i remove @types/react-navigation then errors disappears
I had the same issue.
In my case it was happening because I had @types/react-native with version ^0.57.11 defined in my package.json and as @types/react-navigation has a dependency to to the react native types, it ended up installing a newer version 0.57.12, and because of that the Typescript compiler was throwing errors for duplicate types.
The way that I got it fixed was to update the @types/react-native in my package.json to version 0.57.12, so then there was only one version of the types in use, and the error went away.
I had the same problem and upgrading the react-native types to the latest version did solve the problem. However, we still using RN 0.55 and therefore upgrading the typings to 0.57 does work but might cause problems elsewhere.
The main problem was caused when I tried to upgrade RN to 0.57 and then reset it back to 0.55. During this process, I installed react-navigation & this typing. The typing itself does not require a specific RN typing and yarn is smart about it and only installs one (v0.57 from RN + v* -> v0.57). This is the written into the yarn.lock file. However, when I rolled it back, I changed RN types to v0.55. But yarn kept the association of v* to v0.57, resulting in 2 versions:
"@types/react-native@*":
version "0.57.13"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.57.13.tgz"
dependencies:
"@types/prop-types" "*"
"@types/react" "*"
"@types/[email protected]":
version "0.55.25"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.55.25.tgz"
dependencies:
"@types/react" "*"
You can clearly see, how the * is still matched to v0.57.13. I manually merged the two lines and now it works like a charm with v0.55:
"@types/react-native@*", "@types/[email protected]":
version "0.55.25"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.55.25.tgz"
dependencies:
"@types/react" "*"
I had the same issue — but with another identifier — and what solved for me was adding the resolution for react with a fixed version on my package.json.
{
"resolutions": {
"@types/react": "^16.8.1"
}
}
in my case, I removed yarn.lock and run yarn again, then it interpolate @types/react-native@* correctly and show "@types/react-native@*", "@types/react-native@my-react-native-version":
Most helpful comment
I had the same issue — but with another identifier — and what solved for me was adding the resolution for
reactwith a fixed version on mypackage.json.