cesardeazevedo / react-native-nested-scroll-view

react-native wrapper for android NestedScrollView
MIT License
88 stars 36 forks source link

[FLOW] ScrollView. Duplicate module provider #15

Closed dviluk closed 6 years ago

dviluk commented 6 years ago

Hi!, First of all thanks for the library it is very useful, i don't know why this is not implemented with react-native. ... I started to use flow in my project but when a add react-native-nested-scroll-view@5.0.1 I get the following error:

This only happen when the library is added.

Error: node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js:0
ScrollView. Duplicate module provider
current provider. See: node_modules/react-native-nested-scroll-view/lib/NestedScrollView.js:0

Error: node_modules/react-native/Libraries/Experimental/SwipeableRow/SwipeableListView.js:118
           v-----------------------------------------------------------------
118:       /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
119:        * comment suppresses an error when upgrading Flow's support for React.
120:        * To see the error delete this comment and run Flow. */
            ------------------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Experimental/SwipeableRow/SwipeableListView.js:124
               v-----------------------------------------------------------------
124:           /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
125:            * comment suppresses an error when upgrading Flow's support for
126:            * React. To see the error delete this comment and run Flow. */
                -------------------------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Lists/ListView/ListView.js:95
     v-------------------------------------------------------------------------
 95: /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
 96:  * suppresses an error when upgrading Flow's support for React. To see the
 97:  * error delete this comment and run Flow. */
      -------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Lists/ListView/ListView.js:522
           v-----------------------------------------------------------------
522:       /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
523:        * comment suppresses an error when upgrading Flow's support for React.
524:        * To see the error delete this comment and run Flow. */
            ------------------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Lists/MetroListView.js:110
               v-----------------------------------------------------------------
110:           /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
111:            * comment suppresses an error when upgrading Flow's support for
112:            * React. To see the error delete this comment and run Flow. */
                -------------------------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Lists/MetroListView.js:128
             v-----------------------------------------------------------------
128:         /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
129:          * comment suppresses an error when upgrading Flow's support for React.
130:          * To see the error delete this comment and run Flow. */
              ------------------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Lists/MetroListView.js:149
           v-----------------------------------------------------------------
149:       /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
150:        * comment suppresses an error when upgrading Flow's support for React.
151:        * To see the error delete this comment and run Flow. */
            ------------------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Lists/MetroListView.js:165
         v-------------------------------------------------------------------------
165:     /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
166:      * suppresses an error when upgrading Flow's support for React. To see the
167:      * error delete this comment and run Flow. */
          -------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Lists/VirtualizedList.js:795
             v-----------------------------------------------------------------
795:         /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
796:          * comment suppresses an error when upgrading Flow's support for React.
797:          * To see the error delete this comment and run Flow. */
              ------------------------------------------------------^ Error suppressing comment. Unused suppression

Error: node_modules/react-native/Libraries/Lists/VirtualizedList.js:813
           v-----------------------------------------------------------------
813:       /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
814:        * comment suppresses an error when upgrading Flow's support for React.
815:        * To see the error delete this comment and run Flow. */
            ------------------------------------------------------^ Error suppressing comment. Unused suppression

Found 11 errors

any idea? why

package.json

  "dependencies": {
    "hoist-non-react-statics": "^2.3.1",
    "moment": "^2.20.0",
    "react": "16.0.0-beta.5",
    "react-native": "0.49.3",
    "react-native-extra-dimensions-android": "^0.21.0",
    "react-native-fetch-blob": "^0.10.8",
    "react-native-loader": "^1.2.1",
    "react-native-loading-spinner-overlay": "^0.5.2",
    "react-native-navigation": "^1.1.236",
    "react-native-nested-scroll-view": "5.0.1",
    "react-native-platform-touchable": "^1.1.1",
    "react-native-scrollable-tab-view": "^0.8.0",
    "react-native-searchbar": "^1.13.0",
    "react-native-smart-loading-spinner-overlay": "^1.0.2",
    "react-native-vector-icons": "^4.4.2",
    "react-redux": "^5.0.6",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-persist": "^4.10.1",
    "redux-thunk": "^2.2.0",
    "styled-components": "^2.4.0"
  },
  "devDependencies": {
    "babel-eslint": "^8.0.1",
    "babel-jest": "21.2.0",
    "babel-preset-react-native": "4.0.0",
    "eslint": "^4.9.0",
    "eslint-plugin-react": "^7.4.0",
    "flow-bin": "0.53.0",
    "jest": "21.2.1",
    "react-test-renderer": "16.0.0-beta.5"
  }
dviluk commented 6 years ago

LOL solved this adding the library to:

.flowconfig

[ignore]
...
.*/node_modules/react-native-nested-scroll-view/.*
cesardeazevedo commented 6 years ago

Hi, thanks for report, i just removed the @providesModule, which was causing duplicated module error.

I've shipped at 6.0.1, reopen if you have any more issues.