When running tests with a newly generated react native app, there are warnings about PropTypes being moved to a separate package and React.createClass no longer being supported.
yarn test
Expected the tests to pass with no errors or warnings
Got the following warnings although the test did pass
console.error node_modules/fbjs/lib/warning.js:36
Warning: PropTypes has been moved to a separate package. Accessing React.PropTypes is no longer supported and will be removed completely in React 16. Use the prop-types package on npm instead. (https://fb.me/migrating-from-react-proptypes)
console.error node_modules/react-native/Libraries/Core/ExceptionsManager.js:71
Warning: React.createClass is no longer supported. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement. (https://fb.me/migrating-from-react-create-class)
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts: [email protected] /mnt/Storage/Coding/AwesomeProject
โโโ UNMET PEER DEPENDENCY [email protected]
โโโ [email protected]
npm ERR! peer dep missing: react@>=15.4.0, required by [email protected]
npm ls react-native:[email protected] /mnt/Storage/Coding/AwesomeProject
โโโ UNMET PEER DEPENDENCY [email protected]
โโโ [email protected]
npm ERR! peer dep missing: react@>=15.4.0, required by [email protected]
npm ls expo:[email protected] /mnt/Storage/Coding/AwesomeProject
โโโฌ [email protected]
โ โโโ UNMET PEER DEPENDENCY react@>=15.3.1
โโโ UNMET PEER DEPENDENCY [email protected]
npm ERR! peer dep missing: react@>=15.4.0, required by [email protected]
npm ERR! peer dep missing: react@>=15.3.1, required by [email protected]
npm ERR! peer dep missing: react@>=15.4.0, required by [email protected]
node -v: v6.10.3npm -v: 3.10.10yarn --version: 0.24.6watchman version: not installedAlso specify:
The deprecation warnings are a problem with react-native upstream right now -- some parts were not updated to get rid of the deprecation warnings. This will be fixed in the next release, you can ignore those.
The react dependency warnings are a result of how npm uses semver: >= 15.0.0 will not be satisfied by 16.0.0-alpha.12, so it will show you this warning. You can use yarn if you don't want to see the warning. This will be resolved when React 16 is released, not sure what the timeline is on that though.
the actual problem is -> it's not telling what exact packages are resulting this warning :/
so I don't know if those are the new dependencies I've added or the old ones
Most helpful comment
the actual problem is -> it's not telling what exact packages are resulting this warning :/
so I don't know if those are the new dependencies I've added or the old ones