Solution 1 :
i have seen your code i would like to tell you that first you should edit your package.json
and upgrade the react-native-vector-icons
version
"react-native-vector-icons": "^4.6.0",
to
"react-native-vector-icons": "^6.6.0",
,then delete your node module folder and then run npm install command, and then import vector icons in your file like this:-
import AntDesign from "react-native-vector-icons/AntDesign"
if you still face any problem fell free to ask again.
Problem :
I am facing following issue.
Error: Unable to resolve module `react-native-vector-icons/AntDesign` from `node_modules/react-native-elements/src/helpers/getIconType.js`: react-native-vector-icons/AntDesign could not be found within the project.
Package.json
{
"name": "GeoLocation",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-community/geolocation": "^2.0.2",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-elements": "^1.2.7",
"react-native-fused-location": "^1.1.1",
"react-native-get-location": "^1.4.2",
"react-native-vector-icons": "^4.6.0"
},
"devDependencies": {
"@babel/core": "7.8.4",
"@babel/runtime": "7.8.4",
"@react-native-community/eslint-config": "0.0.5",
"babel-jest": "24.9.0",
"eslint": "6.8.0",
"jest": "24.9.0",
"metro-react-native-babel-preset": "0.56.4",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
}
}
I have done all the steps which mentioned in following link.
Unable to resolve module ‘react-native-vector-icons/AntDesign”
Comments
Comment posted by Kishan Bharda
Have added font list in