-3

When I run on my terminal the following command: npm install react-native

I got this error.
npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native@0.55.4 requires a peer of react@16.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN abdu@1.0.0 No description
npm WARN abdu@1.0.0 No repository field.

+ react-native@0.55.4
updated 1 package in 22.645s

Can someone tell me please, how to fix this Issues? or what does mean?

Thanks a lot.

Abdulwasa
  • 25
  • 1
  • 7

1 Answers1

1

If you start a project from scratch I recommend you to use create-native-app from the official react-native doc : https://facebook.github.io/react-native/docs/getting-started.html

npm install -g create-react-native-app

Then run the following commands to create a new React Native project called "AwesomeProject":

create-react-native-app AwesomeProject

cd AwesomeProject

npm start

otherwise you should simply install missing peer dependancies

npm i -S install ajv react@16.3.1

Flollipop
  • 56
  • 1
  • 5
  • Ok guys Thank you very much. I will try It now with this new method. – Abdulwasa Jul 04 '18 at 14:10
  • I highly recommend you to use create-native-app as you will have other missing peer dep as eslint and so on – Flollipop Jul 04 '18 at 14:17
  • 1
    The Issues was that I did not Install it sudo. It is just working including sudo. I do no why. Also like this: sudo npm install -g create-react-native-app Thank you, guys. – Abdulwasa Jul 04 '18 at 14:28
  • Seem related to this question: https://stackoverflow.com/questions/16151018/npm-throws-error-without-sudo For me, the best way is to use NVM to manage your node and NPM install. The other way is to give right access to npm. But I don't really like the idea to play with npm permision. `sudo chown -R $(whoami) ~/.npm` – Flollipop Dec 27 '18 at 10:47