1

I am currently on version 0.45.1 which is pretty old. And I am trying to upgrade it so that other dependencies work as expected (they updated their libraries and they require 0.46.1 and above).

I am following this process:

  • delete node_module folder
  • change react-native version number in package.json
  • run yarn cache clean
  • run watchman watch-del-all
  • run yarn so that dependencies get downloaded and linked
  • restart packager
  • reload app

App compiles and runs fine for "react-native": "^0.45.1", but some dependencies don't behave right (and they require 0.46 and above).

  • Attempt to upgrade to 0.46.0: I set react-native version number in package.json to "react-native": "^0.46.0", and I follow the above process. I get this error:

Unable to resolve module 'react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry' from '/Users/MyUser/Projects/MyProject/node_modules/native-base/Components/Widgets/Button.js': Module does not exist in the module map

enter image description here

  • Attempt to upgrade to 0.47.0:

I get same error as above.

  • Attempt to upgrade to 0.48.0 (newest RN version):

I get same error as above.

Any help?

1 Answer 1

2

This error indicates a version conflict. You need to change the version of the native base. Native base compatibility versions https://github.com/GeekyAnts/NativeBase#6-compatibility-versions

Sign up to request clarification or add additional context in comments.

5 Comments

Hi, I modified package.json to reflect your advice, but then I get a new error. But I think you are right. Any advice?
Okay, you need to update all the libraries in your dependencies, so there would be no conflicts.
how do I know which error is for which library? For example, in this new error, I read root-siblings and EventEmitter, but nowhere in my package.json I have such libraries. Please and thanks
github.com/magicismight/react-native-root-siblings I suppose you have this library in dependencies. Unfortunately, it has been updated a long time ago, and I doubt that without manual changes it can be launched together with a new react native.
I found it in my yarn.lock file and it is v1.2.1. But on the link you provided me, it says latest release is 1.0.4 :/ weird ! And everytime I delete the file and run yarn to reload it, it downloads root-siblings v1.2.1 automatically (a dependency to other dependency)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.