Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'version' of undefined #5

Open
aymericbouzy opened this issue Oct 13, 2016 · 7 comments
Open

Cannot read property 'version' of undefined #5

aymericbouzy opened this issue Oct 13, 2016 · 7 comments

Comments

@aymericbouzy
Copy link

aymericbouzy commented Oct 13, 2016

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 ?

@aymericbouzy
Copy link
Author

aymericbouzy commented Oct 13, 2016

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.

@darrenchiu
Copy link

same here...

@aymericbouzy
Copy link
Author

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.

@darrenchiu
Copy link

darrenchiu commented Feb 9, 2017

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",

@longpq18
Copy link

Cannot read property 'version' of undefined
my version:
react-native-cli: 2.0.1
react-native: 0.48.3

@aymericbouzy
Copy link
Author

Maybe have a look at Expo.io? I believe they have built in support for these.

@longpq18
Copy link

i use react-native-version-number for replace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants