rollymaduk / react-native-collapsible-tab-header

"Group of react-native components to ease implementation of collapsible headers with tabs"
20 stars 9 forks source link

Ambiguous resolution for react-native #1

Closed sairohithA007 closed 6 years ago

sairohithA007 commented 6 years ago

I'm working on react-native from past 2 months. I'm using this library to achieve collapsible functionality.

When I tried to integrate it as per the guide provided here, it says:

error: bundling failed: ambiguous resolution: module <path_to_project>/reactnative-app/index.js tries to require react-native, but there are several files providing this module. You can delete or fix them:

The first path represents the path of react-native present in the node_modules folder of react-native-collapsible-tab-header library and second path represents the path of react-native folder present in the node_modules of my project.

I'm using the latest version of react-native. Any help is appreciable.

Thanks in advance.

rollymaduk commented 6 years ago

hey sorry for the belated response.. its the xmas holidays, have you tried reseting your cache. Try yarn start --reset-cache

sairohithA007 commented 6 years ago

Sorry for late reply, I was busy with other tasks in the last sprint. I'm using npm and tried the following commands. watchman watch-del-all rm -rf node_modules && npm install rm -fr $TMPDIR/react-* npm start --reset-cache But still I have the same problem.

Thanks in advance.

rollymaduk commented 6 years ago

Hi I don't use npm a lot these days but did you try npm start -- --reset-cache, you seem to have missed the double dash before the --reset-cache or try npm cache clean

sairohithA007 commented 6 years ago

Hi, I tried this solution but still I'm able to see the same error (Ambiguous resolution).

Thanks.

rollymaduk commented 6 years ago

@sairohithA007, I have added a new release on npm with rn and react moved to peer deps, use the tag rn-peer, to install just do npm install react-native-collapsible-tag-header@rn-peer