[Indonesia] Bundling failed: Error: While resolving module `react-native-vector-icons/FontAwesome`
Pernah ngalamin error begini? “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:”
Akhir-akhir ini saya sering menemukan error begitu. Sudah mencoba cara ini
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-*`.
Tapi masih tetap tidak bisa running development server. Error tetap sama. Sedih.
Browsing sana-sini, ternyata memang benar ini masalah di cache. Hanya saja cache yang berbeda. Ini cache di node_modules/react-native
Solusinya seperti ini
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json
Jangan lupa restart development server.
Terima kasih kepada https://github.com/oblador/react-native-vector-icons/issues/626#issuecomment-357405396