react-native: react-native-git-upgrade does not update package.json

Description

Explain what you did, what you expected to happen, and what actually happens.

I current have react native 41.2. I ran react-native-git-upgrade which ends with The upgrade process succeeded but there might be conflicts to be resolved. See above for the list of files that have merge conflicts. After I fixed the conflict, I ran react-native-git-upgrade which ends with an error react-native version in "package.json" (0.41.2) doesn't match the installed version in "node_modules" (0.42.3).

Reproduction Steps and Sample Code

Try to reproduce your bug on https://sketch.expo.io/ and provide a link. If you can’t reproduce the bug on Sketch, provide a sample project. At the very least, provide an example of your code.

Solution

What needs to be done to address this issue? Ideally, provide a pull request with a fix.

Save new version of react-native to package.json

Additional Information

  • React Native version: 0.41.2
  • Platform: Android
  • Development Operating System: MacOs
  • Dev tools: VS Code, Android Studio 2.2.3

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 10
  • Comments: 17 (1 by maintainers)

Most upvoted comments

I managed to solve the does not exist in index problem by changing the name field in package.json to match the project directory name.

I ended up updating react native manually by consulting RNDiff. Worked out quite well, the changes are few.

@ScreamZ I ran the update but updated the package.json myself.

Same here, working on version 0.48.4, trying to update using react-native-git-upgrade. It doesn’t upgrade the deps in package.json, but in node_modules I have 0.49.2 installed