Cannot read property 'version' of undefined
I'm getting this error in Android. It works fine in iOS
Cannot read property 'version' of undefined
Object.getInfoVersion
index.js:8
<unknown>
constants.js:17
loadModuleImplementation
require.js:122
guardedLoadModule
require.js:65
_require
require.js:49
<unknown>
icon.js:4
loadModuleImplementation
require.js:122
guardedLoadModule
require.js:65
_require
require.js:49
<unknown>
main_app.js:23
Maybe the package isn't linked in Android ? When I ran $ rnpm link react-native-app-info, I got
rnpm-link info Linking react-native-app-info ios dependency
rnpm-link info iOS module react-native-app-info has been successfully linked
but nothing about linking Android.
EDIT : I can see that the code has not been released to npm, any plans on doing so ?
I edited my package.json file to fetch directly from github :
"dependencies": {
"react-native-app-info": "Iragne/react-native-app-info",
...
}
ran npm i, and now it seems I have the master branch in my node_modules folder.
However i still get the same error.
same here...
It is now working for me, but it's such a long time ago that I don't really recall what solved it for me.
My package.json file has the following line :
"react-native-app-info": "github:iragne/react-native-app-info",
hope it helps.
thanks @aymericbouzy, i did the similar thing but from a fork version of this repo. Believe it's because a new version haven't been release to npm yet...
"react-native-app-info": "github:ohmyguigs/react-native-app-info",
Cannot read property 'version' of undefined my version: react-native-cli: 2.0.1 react-native: 0.48.3
Maybe have a look at Expo.io? I believe they have built in support for these.
i use react-native-version-number for replace