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

Issues upgrading react-native #11104

Closed
NoelBroda opened this issue Nov 24, 2016 · 6 comments
Closed

Issues upgrading react-native #11104

NoelBroda opened this issue Nov 24, 2016 · 6 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@NoelBroda
Copy link

Description

Following the "Upgrading" documentation (https://facebook.github.io/react-native/docs/upgrading.html), I'm not able to upgrade react-native

Reproduction

Run npm install --save [email protected] having installed version 0.37.0

You will see this log:

➜  xxx git:(master) ✗ npm install --save [email protected]
 npm WARN peerDependencies The peer dependency react@~15.4.0-rc.4 included from react-native will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated [email protected]: use uuid module instead
 
> [email protected] postinstall /Users/xxx/Personal/xxx/node_modules/react-native/node_modules/yeoman-generator/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall

npm ERR! Darwin 16.1.0
npm ERR! argv "/Users/xxx/.nvm/versions/node/v4.4.5/bin/node" "/Users/xxx/.nvm/versions/node/v4.4.5/bin/npm" "install" "--save" "[email protected]"
npm ERR! node v4.4.5
npm ERR! npm  v2.15.5
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 react@~15.4.0-rc.4
npm ERR! peerinvalid Peer [email protected] wants react@^15.3.2

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/xxx/Personal/xxx/npm-debug.log

Solution

Add information about how to upgrade properly react-native

Additional Information

  • React Native version: 0.37.0
  • Platform: N/A
  • Operating System: MacOS
@Ehesp
Copy link
Contributor

Ehesp commented Nov 24, 2016

Have you installed react 15.4?

"react": "15.4.0",

@NoelBroda
Copy link
Author

No. I have react 15.3.2.

But, in this issue I'm not requesting help to update my local environment. I'm reporting a bug in the documentation related to upgrading React Native.
If you follow the steps in the documentation, you can not upgrade react native.

We should add the previous steps to upgrade React before upgrading React Native.
There are another peer dependencies errors during React upgrade as well.

@mkonicek
Copy link
Contributor

This is really confusing, sorry! Here's a PR for the docs:
#11123

We'll release a new upgrade tool soon where we should fix this.

@NoelBroda
Copy link
Author

@mkonicek is there a PR related? Or is it something you are thinking right now?

If you want, you can give a clue about how/where to do it, and I can send a PR.

@mkonicek
Copy link
Contributor

mkonicek commented Nov 27, 2016

If you want, you can give a clue about how/where to do it, and I can send a PR.

I'm not sure I understand, sorry. Send a PR for what exactly?

facebook-github-bot pushed a commit that referenced this issue Nov 28, 2016
Summary:
Fixes issues with docs from #11104.

We should document people should update both `react` and `react-native` until we switch to the new upgrades.
Closes #11123

Differential Revision: D4236994

Pulled By: bestander

fbshipit-source-id: 3baf5187eda3701f867e6801632b018d7fe0c1ff
facebook-github-bot pushed a commit that referenced this issue Dec 1, 2016
Summary:
**Motivation**
As NoelBroda pointed out in #11104 and #11123, NPM often produces an unmet peerDependency when upgrading React Native. It causes a failure when running "npm install" with NPM2.

During the git-upgrade, we have to take care of the `react` peerDep: this PR checks if the installed `react` package matches the `react` peerDep of the new `react-native` version. If so, R & RN are upgraded at the same time (in the same `npm install`).

**Test plan**
- Publish `react-native-git-upgrade` to Sinopia,
- Run `react-native-git-upgrade` inside a RN project with version < 0.37,
- Verify that no "unmet peer dependency" warning is displayed
- Open the `package.json` and verify that both R & RN have been updated
Closes #11226

Differential Revision: D4258007

Pulled By: mkonicek

fbshipit-source-id: cff466d4710807d97fc6161f47bb974097b75261
robclouth pushed a commit to robclouth/react-native that referenced this issue Dec 7, 2016
Summary:
**Motivation**
As NoelBroda pointed out in facebook#11104 and facebook#11123, NPM often produces an unmet peerDependency when upgrading React Native. It causes a failure when running "npm install" with NPM2.

During the git-upgrade, we have to take care of the `react` peerDep: this PR checks if the installed `react` package matches the `react` peerDep of the new `react-native` version. If so, R & RN are upgraded at the same time (in the same `npm install`).

**Test plan**
- Publish `react-native-git-upgrade` to Sinopia,
- Run `react-native-git-upgrade` inside a RN project with version < 0.37,
- Verify that no "unmet peer dependency" warning is displayed
- Open the `package.json` and verify that both R & RN have been updated
Closes facebook#11226

Differential Revision: D4258007

Pulled By: mkonicek

fbshipit-source-id: cff466d4710807d97fc6161f47bb974097b75261
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this issue Jan 4, 2017
Summary:
Fixes issues with docs from facebook#11104.

We should document people should update both `react` and `react-native` until we switch to the new upgrades.
Closes facebook#11123

Differential Revision: D4236994

Pulled By: bestander

fbshipit-source-id: 3baf5187eda3701f867e6801632b018d7fe0c1ff
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this issue Jan 4, 2017
Summary:
**Motivation**
As NoelBroda pointed out in facebook#11104 and facebook#11123, NPM often produces an unmet peerDependency when upgrading React Native. It causes a failure when running "npm install" with NPM2.

During the git-upgrade, we have to take care of the `react` peerDep: this PR checks if the installed `react` package matches the `react` peerDep of the new `react-native` version. If so, R & RN are upgraded at the same time (in the same `npm install`).

**Test plan**
- Publish `react-native-git-upgrade` to Sinopia,
- Run `react-native-git-upgrade` inside a RN project with version < 0.37,
- Verify that no "unmet peer dependency" warning is displayed
- Open the `package.json` and verify that both R & RN have been updated
Closes facebook#11226

Differential Revision: D4258007

Pulled By: mkonicek

fbshipit-source-id: cff466d4710807d97fc6161f47bb974097b75261
@hramos
Copy link
Contributor

hramos commented May 25, 2017

Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why.

@hramos hramos closed this as completed May 25, 2017
@hramos hramos added the Icebox label May 26, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 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

5 participants