question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

15reactions
oerstecommented, Apr 12, 2017

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.

4reactions
Jacsecommented, Nov 3, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading to new versions - React Native
The upgrade command works on top of Git by using git apply with 3-way merge, therefore it's required to use Git in order...
Read more >
Upgrading to new React Native versions
Upgrading your Create React Native App project to a new version of React Native requires updating the react-native , react , and expo...
Read more >
Why Running `yarn upgrade` Does Not Update My `package ...
Running yarn upgrade might update package.json , when the latest stable version no longer matches current range. But it still might not update...
Read more >
Upgrading react native to latest version - Stack Overflow
My advice is to upgrade to the latest version. There will be enough dependency issues anyway so you're best dealing with them only...
Read more >
Updating packages downloaded from the registry - npm Docs
Updating local packages · Navigate to the root directory of your project and ensure it contains a package.json file: cd /path/to/project · In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found