[English] Bundling failed: Error: While resolving module `react-native-vector-icons/FontAwesome`

Garry Priambudi
React Native Zone - English
1 min readJul 18, 2018

Want to read this tutorial in Indonesian?

Ever had this error? “error: bundling failed: Error: While resolving module `react-native-vector-icons/FontAwesome`, the Haste package `react-native-vector-icons` was found. However the module `FontAwesome` could not be found within the package. Indeed, none of these files exist:”

Lately I often encounter such an error. Already tried this way

This might be related to https://github.com/facebook/react-native/issues/4968To resolve try the following:1. Clear watchman watches: `watchman watch-del-all`.2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.3. Reset Metro Bundler cache: `rm -rf $TMPDIR/react-*` or `npm start -- --reset-cache`.  4. Remove haste cache: `rm -rf $TMPDIR/haste-map-react-native-packager-*`.

But still can not run server development. Error remains the same. Sad.

Browsing in some sources, it is true this is a problem in the cache. It’s just a different cache. It’s cached in node_modules/react-native

The solution is here

rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json

Don’t forget to restart development server.

Thanks to https://github.com/oblador/react-native-vector-icons/issues/626#issuecomment-357405396

--

--

Garry Priambudi
React Native Zone - English

CTO as a services, Product Manager with Fullstack Background, Geeks. Father and Husband with love.