Search code examples
react-nativenpmexpo

unable to resolve module `@expo/vector-icons`


Im not sure why I'm getting this error:

Unable to resolve module `@expo/vector-icons` from `...(directory path here)...` : Module does not exist in the module pack

I have tried the following things suggested on other forums/sites:

  1. Clear watchman watches
  2. Deleting the node_modules folder
  3. Reset packager cache

package.json

{
  "name": "app name",
  "version": "0.0.0",
  "description": "Hello Expo!",
  "author": null,
  "private": true,
  "main": "node_modules/expo/AppEntry.js",
  "dependencies": {
    "babel-plugin-module-resolver": "^2.5.0",
    "babel-preset-expo": "^4.0.0",
    "expo": "^21.0.0",
    "firebase": "^4.5.1",
    "geofire": "^4.1.2",
    "moment": "^2.19.1",
    "react": "16.0.0-alpha.12",
    "react-native": "https://github.com/expo/react-native/archive/sdk-21.0.2.tar.gz",
    "react-navigation": "^1.0.0-beta.13"
  }
}

But still nothing, still getting this error


Solution

  • Sounds like vector-icons is another library you should be declaring in your package.json (https://www.npmjs.com/package/@expo/vector-icons)