Thursday, June 6, 2024
 Popular · Latest · Hot · Upcoming
134
rated 0 times [  137] [ 3]  / answers: 1 / hits: 21393  / 6 Years ago, fri, december 21, 2018, 12:00:00

In React native I'm simply applying a Flatlist from react native library.
Succefully installed all libraries



pakage.json



  dependencies: {
feather-icons-react: ^0.3.0,
react: 16.6.3,
react-native: 0.57.8,
react-native-elements: ^1.0.0-beta7,
react-native-vector-icons: ^4.2.0
},
devDependencies: {
babel-jest: 23.6.0,
jest: 23.6.0,
metro-react-native-babel-preset: 0.51.0,
react-test-renderer: 16.6.3
},
jest: {
preset: react-native
}
}


App.js



import React, {Component} from 'react';
import Main from './components/MainComponents';

const instructions = Platform.select({
ios: 'Press Cmd+R to reload,n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,n' +
'Shake or press menu button for dev menu',
});

type Props = {};
export default class App extends Component<Props> {
render() {
return (

<Main />

);
}
}


error log



    error: bundling failed: Error: Unable to resolve module `react-native-vector-icons/Feather` from `F:React NativeFirstProjectnode_modulesreact-native-elementssrchelpersgetIconType.js`: Module `react-native-vector-icons/Feather` does not exist in the Haste module map


newbie to react native



Help will be highy appreciated



Thankyou


More From » reactjs

 Answers
24

To install react-native-vector-icons, you need to install it, then link it. First run:

npm install react-native-vector-icons --save

or if you use yarn

yarn add react-native-vector-icons



Then, you will have to link it like this:

react-native link react-native-vector-icons


[#52886] Saturday, December 15, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josiah

Total Points: 208
Total Questions: 105
Total Answers: 107

Location: Seychelles
Member since Mon, Jun 28, 2021
3 Years ago
;