umhan35 / react-native-search-bar

The high-quality iOS native search bar for react native.
MIT License
862 stars 207 forks source link

Error in Height #154

Closed rincethomas closed 5 years ago

rincethomas commented 5 years ago

Type Error Undefined is not an object. react native. RNSearchBarManager.ComponentHeight

iRoachie commented 5 years ago

Are you using expo?

rincethomas commented 5 years ago

No

iRoachie commented 5 years ago

Couldn't replicate this. I just created a new project and it worked as normal.

  1. react-native init Test
  2. cd Test
  3. npm install react-native-search-bar && react-native link react-native-search-bar
  4. react-native run-ios

Works as expected.

chrise86 commented 5 years ago

I've just encountered this issue too. My package file deps look like this, incase there are any similarities:

"axios": "^0.18.0",
"react": "16.4.1",
"react-native": "0.56.0",
"react-native-i18n": "^2.0.15",
"react-native-keyboard-aware-scroll-view": "^0.6.0",
"react-native-maps": "^0.22.0",
"react-native-navigation": "^2.0.2631",
"react-native-picker-select": "^4.2.0",
"react-native-safe-area-view": "^0.11.0",
"react-native-search-bar": "^3.4.2"
iRoachie commented 5 years ago

As said above, it's usually an issue with linking the library. Try going through the manual steps to setup, and of course restarting your package and running react-native run-ios

chrise86 commented 5 years ago

I had to add the following to the Podfile for it to work:

pod 'ReactNativeSearchBar', :path => '../node_modules/react-native-search-bar'