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

'react-native upgrade' command still remains the old version. #23866

Closed
JYeop opened this issue Mar 12, 2019 · 14 comments
Closed

'react-native upgrade' command still remains the old version. #23866

JYeop opened this issue Mar 12, 2019 · 14 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@JYeop
Copy link

JYeop commented Mar 12, 2019

🐛 Bug Report

The blog(http://facebook.github.io/react-native/blog/) says that the 0.59.0 released, and announced the the new upgrade way using 'react-native upgrade'.
But when I ran the command, the older version of the command result shown.
Is it a just bug or the new way did not applied the new way to the react-native-cli server?

JYs-MBP:0.58.6 jyk$ react-native upgradeYou should consider using the new upgrade tool based on Git. It makes upgrades easier by resolving most conflicts automatically.
To use it:- Go back to the old version of React Native- Run "npm install -g react-native-git-upgrade"
Run "react-native-git-upgrade"See https://facebook.github.io/react-native/docs/upgrading.htmlUpgrading project to react-native v0.58.6
Check out the release notes and breaking changes: https://github.com/facebook/react-native/releases/tag/v0.58.0
Upgrading project to react-native v0.58.6
Check out the release notes and breaking changes: https://github.com/facebook/react-native/releases/tag/v0.58.0

Environment

React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 8.11 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.10.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58.6 => 0.58.6
npmGlobalPackages:
react-native-git-upgrade: 0.2.7

@JYeop JYeop changed the title 'react-native upgrade' command still remains the older version. 'react-native upgrade' command still remains the old version. Mar 12, 2019
@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write `[skip envinfo]` alongside an explanation in your Environment: section.

@react-native-bot

This comment has been minimized.

@hramos
Copy link
Contributor

hramos commented Mar 12, 2019

Copying here additional details from #23867 by @pistou:

🐛 Bug Report

I'm trying to upgrade my projet to 0.59 as it released, but it tries to upgrade to 0.58.6, which is my current react-native version.

$~ > react-native info

  React Native Environment Info:
    System:
      OS: Windows 10
      CPU: (8) x64 Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
      Memory: 8.01 GB / 15.90 GB
    Binaries:
      Yarn: 1.13.0 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD

$~ > react-native --version
react-native-cli: 2.0.1
react-native: 0.58.6

$~ > react-native upgrade
You should consider using the new upgrade tool based on Git. It makes upgrades easier by resolving most conflicts automatically.
To use it:
- Go back to the old version of React Native
- Run "npm install -g react-native-git-upgrade"
- Run "react-native-git-upgrade"
See https://facebook.github.io/react-native/docs/upgrading.html
Upgrading project to react-native v0.58.6
Check out the release notes and breaking changes: https://github.com/facebook/react-native/releases/tag/v0.58.0
Successfully upgraded this project to react-native v0.58.6

$~ > react-native --version
react-native-cli: 2.0.1
react-native: 0.58.6

I tried to uninstall and reinstall react-native-cli just in case but didn't change much.

@thymikee
Copy link
Contributor

New upgrade is a part of RN 0.59. If you upgrade from 0.58 it's not there yet.

@kelset
Copy link
Contributor

kelset commented Mar 12, 2019

👋 there - so, it's a bit of a misunderstanding happening here 😅

Basically, the new upgrade command is usable from 0.59, so when you upgrade to it it's still not available. We are fixing the blogpost to be more clear on it :)

To upgrade to 0.59 we recommend using the rn-diff-purge repo.

@kelset kelset closed this as completed Mar 12, 2019
@JYeop
Copy link
Author

JYeop commented Mar 12, 2019

Thanks! 😄

@turnrye
Copy link
Contributor

turnrye commented Mar 12, 2019

@JYeop @pistou thank you for submitting these issues. We're getting the blog post updated to be clearer.

lukewlms added a commit to lukewlms/react-native-website that referenced this issue Mar 18, 2019
Per facebook/react-native#23866 (comment) from @kelset, it's not possible to use `react-native upgrade` to upgrade *to* RN 0.59; it's only usable *after* an upgrade to 0.59.  The docs should reflect this, as-is it appears that `react-native upgrade` is usable to upgrade **to** RN 0.59.
@appatappa
Copy link

appatappa commented Mar 18, 2019

I should point out that the official upgrade documentation page (https://facebook.github.io/react-native/docs/upgrading.html#content) still shows relies pretty heavily on react-native upgrade, though it does seem to use rn-diff-purge as a reference.

@kelset
Copy link
Contributor

kelset commented Mar 18, 2019

that's because from 0.59 the CLI command upgrade actually uses rn-diff-purge under the surface AFAIK

@appatappa
Copy link

@kelset got it! TBH it's about time they started paying attention to the upgrade process.

@shubhnik
Copy link

shubhnik commented Apr 25, 2019

Documentation of previous versions also shows react-native upgrade method only. Is there any other place where i can check methods to upgrade RN for versions <0.59?

@hramos
Copy link
Contributor

hramos commented Apr 25, 2019

@shubhnik you can find previous versions of the upgrade guide by browsing through the source file's history at https://github.com/facebook/react-native-website/commits/master/docs/upgrading.md

Would you mind opening an issue over at https://github.com/facebook/react-native-website to request these past instructions get added to the upgrading guide? That guide is unversioned, so it will show the same content regardless of which version you select at the top. We'll need to modify the guide to account for past versions. If you can send a PR, that would be even better.

@PomegranateApps
Copy link

So how does one actually upgrade from 0.58.6?

@thymikee
Copy link
Contributor

You can use the CLI as a standalone, e.g.: npx @react-native-community/cli upgrade will do

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

No branches or pull requests

9 participants