infinitered / ignite-andross

The original React Native boilerplate from Infinite Red - Redux, React Navigation, & more
https://infinite.red/ignite
MIT License
474 stars 150 forks source link

Error: While resolving module `react-native-vector-icons/FontAwesome` #203

Closed ccfiel closed 5 years ago

ccfiel commented 6 years ago
Loading dependency graph, done.
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:

  * `/home/chris/todoapp/node_modules/react-native/local-cli/core/__fixtures__/files/FontAwesome(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)`
  * `/home/chris/todoapp/node_modules/react-native/local-cli/core/__fixtures__/files/FontAwesome/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)`
    at resolveHasteName (/home/chris/todoapp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:385:9)
    at ModuleResolver._resolveDependency (/home/chris/todoapp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:315:37)
    at ModuleResolver.resolveDependency (/home/chris/todoapp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:311:877)
    at ResolutionRequest.resolveDependency (/home/chris/todoapp/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:96:16)
    at DependencyGraph.resolveDependency (/home/chris/todoapp/node_modules/metro/src/node-haste/DependencyGraph.js:269:4352)
    at /home/chris/todoapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:201:36
    at Generator.next (<anonymous>)
    at step (/home/chris/todoapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:306)
    at /home/chris/todoapp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:536
    at new Promise (<anonymous>)
 BUNDLE  [android, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ 86.6% (2380/2567), failed.
ruddell commented 6 years ago

It sounds like you're experiencing this issue https://github.com/oblador/react-native-vector-icons/issues/626. You can work around it (I had success with the postinstall workaround mentioned in that issue) or upgrade React Native to a newer version which has the fix (I'm guessing v0.54.x+).

"postinstall": "rimraf ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json # workaround for RN v0.52.0, using rimraf for windows compataibilty",
ruddell commented 6 years ago

This is now fixed in master thanks to the React Native upgrade in #195