React 17 Compatibility
See original GitHub issueHello, I’m new to React and React Native, so please bear with me if this a dumb question. I started a new project, which came with
"react": "17.0.1",
"react-native": "0.64.0"
and when I followed the official documentation on adding navigation, I ran the suggested command
npm install @react-navigation/native @react-navigation/stack
This command failed with
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0" from @react-native-community/masked-view@0.1.10
npm ERR! node_modules/@react-native-community/masked-view
npm ERR! peer @react-native-community/masked-view@">= 0.1.0" from @react-navigation/stack@5.14.3
npm ERR! node_modules/@react-navigation/stack
npm ERR! @react-navigation/stack@"*" from the root project
I then looked for react-native-community/masked-view
, which led me to https://www.npmjs.com/package/@react-native-community/masked-view, where it says the package is at version 0.1.0. There was a link to a repo though - this one.
Here, the latest release is v0.2.3
, well above the 0.1.0
. Coincidentally, this version claims to fix: peerDependencies support React 17
.
There are two questions: Is @react-native-community/masked-view
indeed the same thing as the @react-native-masked-view/masked-view
from this repo?
If so, why are the version numbers so different? Otherwise, why does the NPM page link here?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:27 (4 by maintainers)
Top GitHub Comments
I just installed all the React Navigation packages, including @react-native-community/masked-view (v0.1.10), using yarn instead of npm and it worked.
Thanks for your response. However, if one is not using
masked-view
directly, but via@react-navigation/stack
, how does one resolve this dependency?edit: to me it looks like
@react-navigation/stack
depends on@ react-native-community/masked-view