React-native-router-flux: ERROR: UNMET PEER DEPENDENCY [email protected]

Created on 22 Apr 2017  路  36Comments  路  Source: aksonov/react-native-router-flux

Environment:
"react": "16.0.0-alpha.6",
"react-native": "0.43.4"

I have installed the latest react-native project and tried to install react-native-router-flux, but end up with the error message "UNMET PEER DEPENDENCY [email protected]". Is there any solution to use the react-native-router-flux package with the latest react-native?

C:\workspace\SampleProject>npm i --save react-native-router-flux
[email protected] C:\MyDrive\Project\workspace\SampleProject
-- [email protected] +-- [email protected] +-- UNMET PEER DEPENDENCY [email protected] +-- [email protected] +-- [email protected] |-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | -- [email protected] | |-- [email protected]
| +-- [email protected]
| | -- [email protected] |-- [email protected]
+-- [email protected]
| -- [email protected] +-- [email protected] -- [email protected]

npm WARN [email protected] requires a peer of react@~15.4.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^15.5.4 but none was installed.

Most helpful comment

I fixed this by removing the little ^ symbol in my package.json file in front of the version number of react-native-router-flux. Removing that symbol forces npm install to install the version indicated instead of the newest version.

All 36 comments

same problem

I have the same problem, can be the issue related to OS? In Ubuntu it's working fine but on Linux Mint it's not working.

same problem

Same problem

Yep same, does anyone have a package.json file locked with the latest working pair of react, react-native and react-native-router-flux ?

I fixed this thanks to #1803 and added the 3.38.0 version of react-native-router-flux

same problem

I fixed this by removing the little ^ symbol in my package.json file in front of the version number of react-native-router-flux. Removing that symbol forces npm install to install the version indicated instead of the newest version.

Version 3.38.1 is having issue. By following @wvicioso solution, it should temporary fixes the problem.

Issue still occurs in [email protected]

Even after installing [email protected] I was getting a dependency issue with react-static-container. To solve this I followed this https://github.com/aksonov/react-native-router-flux/issues/1710 . Go to react-native-router-flux/src/TabbedView.js and replace the third line of this file with:
const StaticContainer = require('react-native/Libraries/Components/StaticContainer.react'); You can check this file in the path location inside react-native module. Doing this you will remove the react-native-router-flux dependency with react-static-container. Now remove the react-static-container folder from your modules (if it doesn't have any other dependency with other modules). This worked for me.

I use yarn install , and @wvicioso solution + react-native 0.43.2. work perfectly.

same problem

same problem

+1

Same problem.

+1

+1

+1

+1

+1

+1

  • 1 with version 0.38.1

UNMET PEER DEPENDENCY [email protected]

use version 3.37.0

Solution provided by @ThiagoLottici above works for me. It is at least a temporary fix until the react-native-router-flux library comes up with a newer version which fixes this issue.

same problem.

same problem.

I had same problem, but I resolved it by upgrading NPM to the newest version (v5.0) and after that I installed the lastest react-native-router-flux with no UNMET PEER DEPENDENCY error.

I fixed this by updating react and npm.

Reinstalling yarn did the trick.

npm install -g yarn

fixed it
I update npm to the latest version by sudo npm install -g npm
then recreate project by react-native init MyProject
then npm i react-native-router-flux --save successfully

yarn add whatever dependency.

If you are using expo, you may encounter an error. Restart your expo.

+1. None of the fixes above worked for me with npm.

+1 same issue with react-flip-move
npm 5.5.1
meteor 1.5.2.2
react 16.0.0

image

npm install -g yarn
then create-react-app AppName
then npm install react-router
(sudo npm install -g npm)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fgrs picture fgrs  路  3Comments

sarovin picture sarovin  路  3Comments

booboothefool picture booboothefool  路  3Comments

basdvries picture basdvries  路  3Comments

sylvainbaronnet picture sylvainbaronnet  路  3Comments