npm WARN [email protected] requires a peer of react@>=15.4.0 but none was installed

install  the  react-native     here comes a  questions ::

npm WARN [email protected] requires a peer of react@~15.4.0 but none is installed. You must install peer dependencies yourself.

  HOW TO SOLVE THIS PROBLEM~~~~~:::

Deleted node_module directory from the project

  1. npm cache clean
  2. Modified package.json with: "react":"~15.4.1"; "react-native":"0.42.3"; "react-test-renderer":"15.4.1"
  3. npm install all module
  4. npm install
  5. npm i [email protected] --S
  6. react-native link react-native-maps

Once I do this, it's successfully able to link the android and ios react-native-modules to the project.

猜你喜欢

转载自www.cnblogs.com/mmx8861/p/9150009.html