Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[email protected] requires a peer of [email protected] but none was installed

I am trying to set up for the react native. but whenever I update files it gives m error

    enoent ENOENT: no such file or directory, open 'React Native/package.json'
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN React Native No description
npm WARN React Native No repository field.
npm WARN React Native No README data
npm WARN React Native No license field.
   MacBook-Pro:React Native$ npm info react dist-tags.latest

Please let me know how can I fix.

like image 611
Mahavir Avatar asked Aug 02 '16 11:08

Mahavir


2 Answers

Installing react should fix the error

npm install react --save

Also, you may try upgrading your react-native install. react-native is as v0.30.0 now

npm update react-native
like image 106
Kyle Finley Avatar answered Nov 12 '22 09:11

Kyle Finley


In my specific case I was running npm install in the wrong directory. I thought I was in my project directory but was one level higher. This meant react was missing from installed packages (because there were none) and thus gave this error.

like image 31
fIwJlxSzApHEZIl Avatar answered Nov 12 '22 09:11

fIwJlxSzApHEZIl