toystars / react-native-multiple-select

Simple multi-select component for react-native
MIT License
565 stars 313 forks source link

Failed building javascript Bundle. Unable to resolve module react-native-multiple-select\index.js #184

Open bsqqq opened 3 years ago

bsqqq commented 3 years ago

Issue summary

Looks like there's no index.js in the package...

    5 |  */
> 6 | import MultiSelect from './lib/react-native-multi-select';
      |                        ^
   7 |
   8 | export default MultiSelect;
   9 |
 None of these files exist:
  * node_modules\react-native-multiple-select\lib\react-native-multi-select(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
  * node_modules\react-native-multiple-select\lib\react-native-multi-select\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
  *

Library version: 0.5.6

Steps to Reproduce

  1. Import the package

  2. Put the import as normally do inside render() with all its required props

    <MultiSelect 
    items={colaboradoresFormatados}
    uniqueKey="id"
    selectedItems={equipeId}
    onSelectedItemsChange={(selectedItems: number[]) => setEquipeId(selectedItems)}
    />
  3. Try to run

Expected Behavior

I expected to run normally, like the example in npmjs.com, where i found the package...

Actual Behavior

It pop-ups an error saying that this files doesn't exist like i said earlier... not sure what to do...

kamatchipannerselvam commented 2 years ago

I am new to react native js, i'm also facing this issue only on web view android phone working fine not tested in ios, i'm curious to know in react-native-multi-select.js line no 43, & 55 to 67 used ViewPropTypes.style insted of PropTypes.style first of all is it correct? if yes means please explaine to me why? how to send this propeties values to build component if remove those lines it's working well