Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with React dependency on 0.26.1 #7697

Closed
avishayil opened this issue May 23, 2016 · 13 comments
Closed

Problems with React dependency on 0.26.1 #7697

avishayil opened this issue May 23, 2016 · 13 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@avishayil
Copy link

When performing npm install, for some reason I have to install react@15.0.2 again, otherwise packager throwing an error while running the app.

NPM Warning:

npm WARN react-native@0.26.1 requires a peer of react@15.0.2 but none was installed.

Error:
Error

@rushabh1191
Copy link

same error.!

@jcmartins
Copy link

npm WARN react-native@0.26.1 requires a peer of react@15.0.2 but none was installed.
sudo npm ls -g --depth=0
/usr/lib
├── flow-bin@0.25.0
├── npm@3.9.2
├── UNMET PEER DEPENDENCY react@15.1.0
├── react-native@0.26.1
├── react-native-cli@0.2.0

@ide
Copy link
Contributor

ide commented May 23, 2016

This is your problem: UNMET PEER DEPENDENCY react@15.1.0. 15.1.0 does not match 15.0.2.

@digitalcatnip
Copy link

is there any way to fix this? I've been fighting and trying to upgrade React Native to 0.26.1 all day. Any time I run npm update I now get this error. I've tried deleting node_modules with no luck. Now I can't even run my app!

"npm ERR! peerinvalid The package react does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-native@0.26.1 wants react@15.0.2"

@avishayil
Copy link
Author

I managed to solve it adding exact version of react to my package.json:
"react": "15.0.2"

Try it.
On May 23, 2016 10:39 PM, "James McCarthy" notifications@github.com wrote:

is there any way to fix this? I've been fighting and trying to upgrade
React Native to 0.26.1 all day. Any time I run npm update I now get this
error. I've tried deleting node_modules with no luck. Now I can't even run
my app!

"npm ERR! peerinvalid The package react does not satisfy its siblings'
peerDependencies requirements!
npm ERR! peerinvalid Peer react-native@0.26.1 wants react@15.0.2"


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#7697 (comment)

@satya164
Copy link
Contributor

npm install -S react@~15.0.2

@digitalcatnip
Copy link

@avishayil 's suggestion fixed it. I removed the ^ in package.json and re-ran npm update and it's all better now - except my app won't run because of the whole React / React-Native break I think.

@aaronschachter
Copy link

aaronschachter commented May 23, 2016

@avishayil @digitalcatnip -- Are you adding into the dependencies object?

I may be adding reactinto the wrong section of package.json. Setting both as dependencies still throws the warning:

npm WARN react-native@0.26.1 requires a peer of react@15.0.2 but none was installed.

 "dependencies": {
    "react": "^15.0.2",
    "react-native": "^0.26.1"
  }

After I get the warning in npm install, I can get things working by running npm install --save react@15.0.2

@ide
Copy link
Contributor

ide commented May 23, 2016

Remove the "^" from the react version:

  "dependencies": {
    "react": "15.0.2",
    "react-native": "^0.26.1"
  }

@celrak
Copy link

celrak commented May 24, 2016

Just to be clear, react-native now requires react?

Nilhcem added a commit to Nilhcem/97things-reactnative that referenced this issue May 24, 2016
@walter211
Copy link

still met this problem after removing ^

@MerlinYu
Copy link

MerlinYu commented Jun 2, 2016

I check packge.json
"dependencies": {
"react": "^15.0.2",
.....
}

then I npm install -S react@~15.0.2 to solve this warn.

@ravirupareliya
Copy link

After upgrading from version 0.38.0 to 0.42.0 i am getting this error

java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a packager server.
 at com.facebook.react.cxxbridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
 at com.facebook.react.cxxbridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:198)
 at com.facebook.react.cxxbridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:33)
 at com.facebook.react.cxxbridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:216)
 at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:994)
 at com.facebook.react.ReactInstanceManager.access$600(ReactInstanceManager.java:109)
 at com.facebook.react.ReactInstanceManager$4.run(ReactInstanceManager.java:746)
 at java.lang.Thread.run(Thread.java:761)

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests