react-native: React Native v0.44 DeviceInfo native module is not installed correctly

Description

At first I run create new project using expo And then at package.json I change the react-native version to v0.44.

When run using expo (send to device) I receive DeviceInfo native module is not installed correctly.

Reproduction Steps and Sample Code

{
  "name": "example",
  "version": "0.0.0",
  "description": "Hello Expo!",
  "author": null,
  "private": true,
  "main": "main.js",
  "dependencies": {
    "axios": "^0.16.1",
    "expo": "16.0.0",
    "react": "16.0.0-alpha.6",
    "react-native": "0.44.0",
    "react-native-elements": "^0.11.2"
  }
}

Why I changed my react-native version to 0.44 because at expo sdk (v0.43) I got error while updating property selectioncolor of view managed by androidtextinput error. https://github.com/facebook/react-native/issues/13465

Additional Information

  • React Native version: v0.44
  • Platform: Android
  • Development Operating System: [FILL THIS OUT: Windows 10
  • Dev tools: VSCode, Expo XDE

About this issue

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

Most upvoted comments

This usually happens when you have multiple packagers running, or are running the packager for a different application.

@stefensuhat Just recompile your project, and it will solve 😉 You’re can be using a new RN code with an outdated binary. This happened to me in both platforms when I’ve upgraded

Somehow, my side, the issue is fixed by reset the simulator device

I’m also facing the same problem. Please guide me.

I’m working on salesforce mobile SDK, below are the npm dependencies. image

image

I did that aswell but now i’m getting undefined is not an object (evaluating '_reactNative.ViewPropTypes.style') as if the upgrade/downgrade messed with my modules. I tryed to delete node_modules and run npm i but no luck.

Has anyone found a solution for this? I have tried the above suggestions but I am still getting the same error: undefined is not an object (evaluating ‘RCTAsyncStorage.multiMerge’)

@krosti trying sdk-17.0.0.tar.gz shows error below.

undefined is not an object (evaluating ‘RCTAsyncStorage.multiMerge’)

“dependencies”: { “axios”: “^0.16.0”, “eslint”: “^3.19.0”, “moment”: “^2.18.1”, “react”: “16.0.0-alpha.6”, “react-native”: “https://github.com/expo/react-native/archive/sdk-17.0.0.tar.gz”, “react-native-adjust”: “4.11.1”, “react-native-android-permissions”: “0.0.7”, “react-native-checkbox-field”: “^1.1.0”, “react-native-datepicker”: “^1.3.2”, “react-native-firebase-analytics”: “^3.0.0”, “react-native-geocoder”: “^0.4.6”, “react-native-google-ads-conversion-tracking”: “^0.1.0”, “react-native-google-analytics-bridge”: “^5.0.1”, “react-native-google-places-autocomplete”: “^1.2.6”, “react-native-i18n”: “0.0.8”, “react-native-image-progress”: “^0.6.0”, “react-native-instagram-oauth”: “0.0.7”, “react-native-inviewport”: “^1.1.0”, “react-native-linear-gradient”: “^2.0.0”, “react-native-maps”: “^0.15.2”, “react-native-permissions”: “^0.2.7”, “react-native-progress”: “^3.0.0”, “react-native-push-notification”: “^2.1.0”, “react-native-safari-view”: “^2.0.0”, “react-native-share”: “^1.0.13”, “react-native-simple-modal”: “^5.0.0”, “react-native-social-share”: “^0.8.0”, “react-native-video”: “^1.0.0”, “react-redux”: “^5.0.5”, “redux”: “^3.7.0”, “redux-immutable”: “^4.0.0”, “redux-logger”: “^3.0.6”, “redux-persist”: “^4.8.1”, “redux-thunk”: “^2.2.0”, “rnpm”: “^1.9.0”, “superqs”: “^0.1.1”, “window-size”: “^0.3.0”, “ws”: “^1.1.1” },

Do you have any workaround?

I fixed using the fork from Expo’s repository of the React Native NPM module: https://github.com/expo/react-native/archive/sdk-17.0.0.tar.gz .

In package.json just do this:

...
"react-native": "https://github.com/expo/react-native/archive/sdk-17.0.0.tar.gz",
...

Of course npm install is needed

I’ve deleted the entirely folder node_modules just in case and then npm i

i think what @rodriguesbreno mean it, recompile the native app. If you using expo then you need to detach it and run react-native-upgrade . After that you need to recompile the android/ios folder.