Run react-native info in your terminal and paste its contents here.
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 47.09 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.8.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.2.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: ^16.5.0 => 16.5.1
react-native: ^0.57 => 0.57.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-git-upgrade: 0.2.7
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
I'm running yarn install using the following package.json file:
"dependencies": {
"@babel/polyfill": "^7.0.0",
"ent": "^2.2.0",
"jssha": "^2.3.1",
"lodash": "^4.17.10",
"moment": "^2.19.4",
"moment-timezone": "^0.5.17",
"react": "^16.5.0",
"react-native": "^0.57",
"react-native-elements": "^0.19.1",
"react-native-fast-image": "^4.0.14",
"react-native-htmlview": "^0.13.0",
"react-native-hyperlink": "0.0.11",
"react-native-remote-svg": "^1.2.0",
"react-native-scrollable-tab-view": "^0.8.0",
"react-native-svg": "^6.3.1",
"react-native-vector-icons": "^5.0.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-saga": "^0.16.0",
"reselect": "^3.0.1"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"babel-core": "7.0.0-bridge.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-react": "^7.0.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"concurrently": "^2.2.0",
"jest": "^23.6.0",
"metro-react-native-babel-preset": "^0.45.2",
"msvgc": "^0.1.1",
"prettier": "1.9.2",
"react-dom": "^16.3.0-alpha.1",
"react-native-storybook-loader": "^1.6.0"
}
I receive the following warning:
warning " > [email protected]" has incorrect peer dependency "[email protected]".
Is this the right behavior? Thanks.
Check your React version.
react: ^16.5.0 resolves to [email protected] You can either force the expected React version (react: '16.5.0' without the ^) or ignore it.
https://github.com/facebook/react/releases
https://docs.npmjs.com/misc/semver
@ellman121 Thanks!
It's just a warning about a minor version difference, that can be fixed via @ellman121 solution.
Shouldn't react-native have peer dependency to react: *. Why would it care which react is being used? If you use certain React features you can always do react: >16.3 for instance and then let developer decide which react to use.
At this very moment React-native traps developers and also causes a lot of warnings when using workspaces because even patch difference across workspace will cause warnings and conflicts across hundreds of packages. That's sad it's very hostile towards the eco-system to lock the version like this.
Most helpful comment
Check your React version.
react: ^16.5.0resolves to[email protected]You can either force the expected React version (react: '16.5.0'without the^) or ignore it.https://github.com/facebook/react/releases
https://docs.npmjs.com/misc/semver