React-native: How to downgrade properly to a lower version of RN

Created on 25 Jun 2016  路  5Comments  路  Source: facebook/react-native

Refer here on the issue.

I wanted to use enzyme for shallow rendering and testing RN components but enzyme happens to want React 15.1.0, while RN 0.26.0 (Which was what I was using) wants React 15.0.2.

And then I upgraded (ran react-native upgrade) after npm installing RN 0.26.3 then realized I should be at 0.28 for newer React version. But after that react-native-router-flux broke and I got Failed to build DependencyGraph: @providesModule naming collision:.

So I just reverted all my changes from git. And since then had been unable to do an npm install.
I keep running into

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v4.4.3
npm ERR! npm  v2.15.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants [email protected]
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0 || ^15.0.0-0

So whats RN recommended way to downgrade ? (Note that package.json has all the right versions I want RN 0.26.0 and React 15.0.2, but still the above error)

Locked

Most helpful comment

Would have been nice to include a link before closing the ticket. This is the first result coming up on Google.

All 5 comments

I am going to close this issue since there's already StackOverflow question (great!) and it has more details.

PS. I've already answered there, hope it helps.

Would have been nice to include a link before closing the ticket. This is the first result coming up on Google.

following worked for me

npm install [email protected] for ex: npm install [email protected]

How to downgrade globally?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DreySkee picture DreySkee  路  3Comments

despairblue picture despairblue  路  3Comments

janmonschke picture janmonschke  路  3Comments

lazywei picture lazywei  路  3Comments

ghost picture ghost  路  3Comments