-
Notifications
You must be signed in to change notification settings - Fork 77
Cannot read property of 'init' of undefined #133
Comments
Here's how I solved this. Note that it appears the react-native linking through the CLI is not working correctly. You can see better error messages by first running react-native run-ios. If you have the same problem as I do, you'll see that Lock.h and OneSignal.h are not found.
Auth0 devs: please fix the automated installer! |
@lukecwilliams I'm actually running an android project. Do you have any solutions for android? |
@lukecwilliams the automated installer works for iOS in the latest version also in your instructions the change in the Podfile (OneSignal) is not needed since you never perform a The only way the automated install fails if you changed something in Xcode project by hand |
@hzalaz any solutions for my issue? |
About the android error make sure the plugin is properly linked for android which includes it being included like stated in https://github.com/auth0/Mobile-Samples.React/issues/11#issuecomment-281495729 because that error means that react native could not find the native module. |
@ldunphy1 last week tried the install from scratch (using react-native cli project creator) and it worked without issues in both platforms (tested on Mac not sure that matters) |
I don't have a Mac. I have Windows. |
@hernan-m87 Thanks for the response. Good to know 'OneSignal' is unnecessary to add. The automated installer definitely added the two new libraries with an extra "../" in each header path that I had to manually remove. |
I tried on a friends computer (also windows os), to make sure it's not just my machine. It also wasn't working |
@ldunphy1 did perform the first step of https://github.com/auth0/react-native-lock#react-native-cli-1 ? |
Now I'm back to this issue that was never answered: #129 |
Just in case any one else comes along: I was also getting these errors (missing Lock/Lock.h etc.) and had to change the Header Search Paths to
BTW I was getting these errors whether I followed the react-native-cli or Manual instructions. |
@StevenFrostwick My working first line there has 3 "directory up" commands, does yours work with just 2? I have: Rest are the same. |
Yeah two Which seems to make sense as React is two levels up from the |
Can I confirm, if I install manually, do I still need a pod file? |
I saw that this issue existed, but also that it was closed without stating a solution.
My package.json:
{
"name": "dirtydrawz",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "15.3.2",
"react-native": "0.34.1",
"react-native-collapsible": "^0.7.0",
"react-native-custom-checkbox": "^1.5.0",
"react-native-datepicker": "^1.4.2",
"react-native-elements": "^0.6.4",
"react-native-lock": "^0.5.0",
"react-native-material-kit": "^0.3.3",
"react-native-toggle": "^1.0.3",
"react-native-vector-icons": "^3.0.0"
}
}
The text was updated successfully, but these errors were encountered: