I just upgraded react-native version to 0.48.1 from 0.30 and I am facing a weird issue. I fixed all the peer-dependencies for the libraries that I am using. then ran command,
react-native start
running above command starts packager. Now when I hit below url to generate jsbundle, http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false
I am getting below error,
"message":"Ambiguous resolution: module '$PROJ_ROOT_DIR/index.android.js' tries to require 'react-native', but there are several files providing this module. You can delete or fix them:
$PROJ_ROOT_DIR/node_modules/jest-react-native/node_modules/react-native/package.json
$PROJ_ROOT_DIR/node_modules/react-native/package.json"
$PROJ_ROOT_DIR is my project directory path.
I don't have any '$PROJ_ROOT_DIR/node_modules/jest-react-native/node_modules/' directory in my setup. I tried deleting node_modules directory then running npm install. but nothing changed.
I have also tried, clearing packager cache by running command,
ls -l $TMPDIR/react-*
but nothing happened.
Has anyone faced similar issue? any suggestions?
Thanks in advance!
react-native start? - Manvendra SKreact-native startandnpm startmight be same. But they are not. - ggsrivasreact-native start -- --reset-cacheand nothing was happening. wasted few hours. :( - ggsrivas