Describe the bug
after installing CocoaPod, it is giving me this error when I run command react-native run-ios. earlier it was working fine.
To Reproduce
Steps to reproduce the behavior:
simply run react-native run-ios
Expected behavior
it should run without any error
Desktop (please complete the following information):
Smartphone (please complete the following information):
package.json
{
"name": "VikingHealth",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"aws-amplify": "^1.0.11",
"aws-amplify-react": "^2.0.1",
"aws-amplify-react-native": "^2.0.1",
"aws-appsync": "^1.7.0",
"aws-appsync-react": "^1.2.5",
"aws-sdk": "^2.353.0",
"d3-shape": "^1.2.2",
"es6-symbol": "^3.1.1",
"google-libphonenumber": "^3.1.14",
"graphql-tag": "^2.10.0",
"i": "^0.3.6",
"install": "^0.12.2",
"link": "^0.1.5",
"lodash": "^4.17.11",
"mobx": "^4.8.0",
"mobx-react": "^5.0.0",
"moment": "^2.22.2",
"moment-range": "^4.0.1",
"npm": "^6.7.0",
"opentok-react-native": "^0.9.5",
"prop-types": "^15.6.2",
"react": "16.5.0",
"react-apollo": "^2.2.4",
"react-art": "^16.6.0",
"react-native": "^0.57.7",
"react-native-chart-kit": "^1.1.9",
"react-native-circular-progress": "^1.0.1",
"react-native-easy-toast": "^1.1.0",
"react-native-elements": "^1.0.0-beta7",
"react-native-i18n": "^2.0.15",
"react-native-keyboard-aware-scroll-view": "^0.7.2",
"react-native-linear-gradient": "^2.4.2",
"react-native-multiple-picker": "0.0.21",
"react-native-parallax-header": "^1.0.6",
"react-native-phone-input": "^0.2.1",
"react-native-popup-dialog": "^0.16.3",
"react-native-progress": "^3.5.0",
"react-native-progress-circle": "^2.0.1",
"react-native-segmented-control-tab": "^3.3.1",
"react-native-simple-dialogs": "^0.4.1",
"react-native-slider": "^0.11.0",
"react-native-svg": "^6.4.1",
"react-native-svg-charts": "^5.2.0",
"react-native-triangle": "0.0.9",
"react-native-vector-icons": "^6.1.0",
"react-native-video": "^4.2.0",
"react-navigation": "^2.14.2",
"rn-viewpager": "^1.2.9"
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.1.2",
"@babel/runtime": "^7.1.2",
"babel-jest": "23.6.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint-config-rallycoding": "^3.2.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "^0.48.3",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./assets/fonts/"
]
}
}
Additional context
error: bundling failed: Error: Unable to resolve module axios
from /Users/tarun/Desktop/projects/quovantis-projects/Viking-health-Master/VikingHealth/node_modules/@aws-amplify/api/lib/RestClient.js
: Module axios
does not exist in the Haste module map or in these directories:
/Users/tarun/Desktop/projects/quovantis-projects/Viking-health-Master/VikingHealth/node_modules/@aws-amplify/api/node_modules
This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
watchman watch-del-all
.node_modules
folder: rm -rf node_modules && npm install
.rm -rf /tmp/metro-bundler-cache-*
or npm start -- --reset-cache
.rm -rf /tmp/haste-map-react-native-packager-*
.I am struggling with the same error - the suggestion to resolve the issue does not rectify it unfortunately
@matt-paul and @tarunmehta-quovantis did you got any solution?
Same error here
+1
same here
I was able to solve it after remove the file rn-cli.js
that I created to solve another problem
I deleted rn-cli.js (if you have it in your root folder).
add
pod 'React', :path => '../node_modules/react-native'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
to your Podfile located in your ios folder.
Then run cd ios && rm -rf Pods && pod install
Same issue.
What I can't explained is that it properly build using Xcode but it doesn't build using react-native run-ios
...
you dont have any error on android ?
I have similar issue. any updates?
same issue for me. any resolution? Thanks.
Same issue on android, but I have the same issue on import any other dependencies.
I solved this problem by adding the dependencies by SU instead of SUDO in Ubuntu
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
Most helpful comment
I was able to solve it after remove the file
rn-cli.js
that I created to solve another problem