AdelRedaa97 / react-native-select-dropdown

react-native-select-dropdown is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.
MIT License
320 stars 137 forks source link

ReferenceError: Can't find variable: findIndexInArr In react native #53

Closed vikaskathuria closed 2 years ago

vikaskathuria commented 2 years ago
Screenshot 2022-04-13 at 1 33 33 PM
AdelRedaa97 commented 2 years ago

Which version do you use? Try to remove node_modules and install them again rm -rf node_modules and run npm i or yarn reset cache also may help npm start -- --reset-cache

vikaskathuria commented 2 years ago

HI Thanks for reply Its still not working I am using "react-native": "0.68.0", "react": "17.0.2", "react-native-select-dropdown": "^1.11.0",

AdelRedaa97 commented 2 years ago
Screen Shot 2022-04-13 at 3 36 38 PM

I've tried using the same versions and it's working fine for Android and iOS. you can kill node processes killall -9 node and remove node_module and install again

aquan9 commented 2 years ago

I was having the same error after accidentally doing an npm update, and upgrading all of my modules. I'm compiling for the web using the webpack that's built into Expo. I downgraded react-native-select-dropdown to version 1.7.0 and it works now.

npm install react-native-select-dropdown@1.7.0

AdelRedaa97 commented 2 years ago

Does this way to import/export functions doesn't work for some node versions ??

export const findIndexInArr = () => {...}

import {findIndexInArr} from './helpers/findIndexInArr';