React-native-gesture-handler: Not able to run examples

Created on 1 Dec 2017  ·  3Comments  ·  Source: software-mansion/react-native-gesture-handler

I keep getting this error even after recloning and clearing all caches:

Loading dependency graph, done.
Bundling `index.ios.js`  [development, non-minified]  0.0% (0/1), failed.
error: bundling failed: ambiguous resolution: module `/Users/brunolemos/Projects/packages/react-native-gesture-handler/Example/index.ios.js` tries to require `react-native`, but there are several files providing this module. You can delete or fix them: 

  * `/Users/brunolemos/Projects/packages/react-native-gesture-handler/Example/node_modules/react-native-gesture-handler/Example/node_modules/react-native/package.json`
  * `/Users/brunolemos/Projects/packages/react-native-gesture-handler/Example/node_modules/react-native/package.json`

Most helpful comment

Running this inside the Example folder make it work:

rm -rf ../node_modules/react-native
npm start -- --reset-cache

But that shouldn't be needed, something is wrong.

All 3 comments

Running this inside the Example folder make it work:

rm -rf ../node_modules/react-native
npm start -- --reset-cache

But that shouldn't be needed, something is wrong.

@brunolemos after that also i getting this
error: bundling failed: ambiguous resolution: module/Users/thecodetalker/Documents/REACTNATIVE/react-native-gesture-handler/Example/index.ios.jstries to requirereact-native`, but there are several files providing this module. You can delete or fix them:

  • /Users/thecodetalker/Documents/REACTNATIVE/react-native-gesture-handler/Example/node_modules/react-native-gesture-handler/Example/node_modules/react-native-gesture-handler/Example/node_modules/react-native/package.json
  • /Users/thecodetalker/Documents/REACTNATIVE/react-native-gesture-handler/Example/node_modules/react-native/package.json

Hey @TheCodeTalker

Are you installing gesture handler lib from NPM? Because the package distributed via npm does not contain the Example folder. So it seems like you might have npm link it or maybe copy from git clone?

Was this page helpful?
0 / 5 - 0 ratings