How to fix the "TouchHistoryMath. Duplicate module provider" stream error

I am setting up a new project and started importing some libraries when I get the following stream error. What does this error mean and how can I diagnose and correct it? This is a reciprocal native project, and I recently added a library subscriptions-transport-ws.

Launching Flow server
Spawned flow server (pid=13272)
node_modules/react-native/Libraries/Renderer/src/renderers/shared/stack/event/eventPlugins/TouchHistoryMath.js:0
TouchHistoryMath. Duplicate module provider
current provider. See: node_modules/react-native-gesture-responder/library/TouchHistoryMath.js:0

package.json

"scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest",
    "flow": "node_modules/.bin/flow",
    "flow-stop": "node_modules/.bin/flow stop"
},
"dependencies": {
    "@shoutem/ui": "^0.10.9",
    "apollo-client": "0.8.0",
    "graphql": "^0.9.1",
    "graphql-tag": "^1.2.4",
    "lodash": "^4.17.4",
    "react": "~15.4.0",
    "react-apollo": "^0.10.1",
    "react-native": "0.41.2",
    "react-native-lock": "^0.4.0",
    "react-redux": "^5.0.2",
    "redux": "^3.6.0",
    "redux-actions": "^1.2.1",
    "redux-persist": "^4.4.0",
    "redux-thunk": "^2.2.0",
    "subscriptions-transport-ws": "^0.5.1"
},
"devDependencies": {
    "babel-eslint": "^7.1.1",
    "babel-jest": "18.0.0",
    "babel-preset-react-native": "1.9.1",
    "eslint": "^3.15.0",
    "eslint-config-airbnb": "^14.1.0",
    "eslint-plugin-import": "2.2.0",
    "eslint-plugin-jsx-a11y": "^4.0.0",
    "eslint-plugin-react": "6.9.0",
    "flow-bin": "0.37.0",
    "jest": "18.1.0",
    "react-test-renderer": "~15.4.0"
},
"jest": {
    "preset": "react-native"
}
+4
source share
2 answers

I believe this is an error caused by two modules with the same name. The workaround that solved the problem for me was to tell Flow to ignore one of the modules. In other words, add one (or both) of the following lines to the section of [ignore]your .flowconfig file:

.*/node_modules/react-native/Libraries/Renderer/src/renderers/shared/shared/event/eventPlugins/TouchHistoryMath.js
.*/node_modules/react-native-gesture-responder/library/TouchHistoryMath.js

: , -, , - , @shoutem/ui. , , .

+1

.

# UNSUPPORTED - HASTE
#module.system=haste
#module.system.haste.use_name_reducers=true

: https://github.com/facebookarchive/node-haste

/ Facebook , .

0

Source: https://habr.com/ru/post/1669886/


All Articles