Skip to content

Instantly share code, notes, and snippets.

@ntamvl
Created June 6, 2018 04:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntamvl/81202b4ed6a9c2f75e91ae9d7a9c62a7 to your computer and use it in GitHub Desktop.
Save ntamvl/81202b4ed6a9c2f75e91ae9d7a9c62a7 to your computer and use it in GitHub Desktop.
Error: While resolving module `react-native-vector-icons/MaterialIcons`, the Haste package `react-native-vector-icons` was found

Error: While resolving module react-native-vector-icons/MaterialIcons, the Haste package react-native-vector-icons was found

The file it is trying to find does in fact declare that module.

This is why it breaks now: facebook/metro#139 (comment)

Related issue: #379

The broken file: https://github.com/facebook/react-native/blob/master/local-cli/core/__fixtures__/files/package.json

Workaround

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

There are some answers below for how to automate this Using rn-cli.config.js Using package.json

source: oblador/react-native-vector-icons#626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment