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

Created on 3 May 2017  路  23Comments  路  Source: facebook/react-native

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
Locked

Most helpful comment

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

All 23 comments

Expo SDK v16 doesn't support react-native 0.44, maybe they will support in next release (SDK v17). Change react-native to 0.44 will don't help.

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

@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

@giautm yeah. I can't wait because of the input text bug

@rodriguesbreno @hellomaya I've tried compile it few times keep getting those error

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.

@dededada @stefensuhat Exactly!
I mean recompile the native app.

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

Hi, i reproduced all these steps and still face the issue.

I've solved as a temporary. Not sure which step worked.

"dependencies": {
    "react": "16.0.0-alpha.6",
    "react-native": "0.43.0"
  }

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.

Same issue, but i can fix it now, you can create new fresh project with Expo v0.17 then copy existing project to override it, this will fixed expo upgrade issue on this version.

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

@krosti there is any PR /fix for react-native#master?

@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?

@akudo7 : Trying to uninstall Expo-Client app and try again.

@akudo7 Have you expo client? Try below.

In exp.json, change sdkVersion to "17.0.0"
In package.json, change these dependencies:

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

@giautm @sungjk Hi, thank you very much for your reply! I am not familiar with using expo thought. Is it possible to point me how to write exp.json in this case? Again, thank you very much. You are my only hope.

@akudo7 try this. Expo Document

I have the same issue.
And I run project at Xcode while have jsbundle in my project.
When I click Button and load the bundle that the simulator show this error.
I run rm -rf node_modules && npm install at rn root but does not work.
Please anyone can solve this problem help me.

I have the same issue for both platforms, and the reason is that the version of RN libraries (integrates them into an old project) is not the same with the RN version used to build the bundle file. Check the versions if you have the same problem. :-)

reset the simulator and try again it should work fine

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')

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

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

image

Was this page helpful?
0 / 5 - 0 ratings