Amplify-js: Error with AWS Amplify React Native - Missing React Native Vector Icons dependency

Created on 29 Aug 2018  路  5Comments  路  Source: aws-amplify/amplify-js

Do you want to request a feature or report a bug?
bug

What is the current behavior?
error when running project when using withAuthenticator HOC with aws-amplify-react-native dependency.

Module 'react-native-vector-icons/MaterialIcons' does not exist in the Haste module map.

screen shot 2018-08-28 at 5 11 38 pm

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than AWS Amplify.

  1. Create React Native project
  2. Initialize Amplify project
  3. Install aws-amplify & aws-amplify-react-native dependencies
  4. Use withAuthenticator HOC

What is the expected behavior?
Project compiles

Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?
AWS Amplify React Native Version: 2.0.0
AWS Amplify version: 1.0.8

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.

Auth React Native

All 5 comments

This can be fixed locally by manually installing & linking the React Native Vector Icons library. I think this is because there is a dependency here on React Native Elements which itself has a dependency on React Native Vector Icons.

I tried using create-react-native-app and doesnt have that problem.

Just to come back around and update this issue:

This will not error out when using the Create React Native App CLI because this CLI (Expo) ships with React Native Vector Icons already included.

This is only an issue for developers creating an app using the React Native CLI.

For additional information:

The library required is this: https://www.npmjs.com/package/react-native-vector-icons

My understanding to fix this is:


    1. yarn add react-native-vector-icons || npm i react-native-vector-icons


    1. react-native link react-native-vector-icons || react-native link

You should get an image similar to this:
Console Result

Can this be closed thanks to the Merged PR above?

@builtbyproxy yes it does look like #1543 should have fixed this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ldgarcia picture ldgarcia  路  3Comments

cgarvis picture cgarvis  路  3Comments

cosmosof picture cosmosof  路  3Comments

karlmosenbacher picture karlmosenbacher  路  3Comments

guanzo picture guanzo  路  3Comments