Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Can't install #57

Closed
hassankhan opened this issue May 30, 2016 · 9 comments
Closed

Can't install #57

hassankhan opened this issue May 30, 2016 · 9 comments

Comments

@hassankhan
Copy link

hassankhan commented May 30, 2016

I ran the install command as per the README:

npm ERR! peerinvalid The package react@15.1.0 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-native-mock@0.2.2 wants react@*
npm ERR! peerinvalid Peer react-native@0.26.2 wants react@15.0.2

Not really sure why it's being like that, could you possibly remove react as a peerDependency?

Thanks for creating this, by the way 😄

@hassankhan
Copy link
Author

I should have probably mentioned my use-case, I'm trying to write tests for a React Native plugin, so I'm saving it as a devDependency in the plugin's package.json. In an ideal scenario, I'd rather not install either react or `react-native, only this mock package.

@RealOrangeOne
Copy link
Owner

Hi, this looks like youre trying to install the wrong version of react. You have to install 15.0.2 to work with react-native 0.26.

@hassankhan
Copy link
Author

I haven't specified any version of react OR react-native to install, I only wanted to install this package.

@RealOrangeOne
Copy link
Owner

RealOrangeOne commented May 30, 2016

you will need to install react for this package to work, the version must be the same as the one required for the latest version of react-native, in this case, 15.0.2. The easiest way to do this would be to add react-native as a dev-dep to your project, then it installs everything you need

@hassankhan
Copy link
Author

Ahh okay, thanks for the pointer. I tried installing react-native as a devDependency (npm install react-native@0.26), that didn't work either. Turns out I needed to install both:

$ npm install react@15.0.2 react-native@^0.26 --save-dev

@RealOrangeOne
Copy link
Owner

The mock is designed to run on react-native projects, therefore they'll need react and react-native installed. I should probably work on adding them as specific dependancies, so this doesnt happen in the future

@sibelius
Copy link
Contributor

sibelius commented Jun 6, 2016

this line https://github.com/lelandrichardson/react-native-mock/blob/master/package.json#L43 will cause the same problem on RN27 that depends on react@^15.1.0 instead of react@15.0.2

@RealOrangeOne
Copy link
Owner

Yes, this is by design. I shall update these versions in the deploy I do later today. react-native-mock is only designed to work with the most recent version of react-native

@sibelius
Copy link
Contributor

sibelius commented Jun 6, 2016

\o/ let's keep on the bleeding edge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants