Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native-elements - vector icons #53

Closed
wedelgaard opened this issue Mar 14, 2017 · 5 comments
Closed

react-native-elements - vector icons #53

wedelgaard opened this issue Mar 14, 2017 · 5 comments
Labels

Comments

@wedelgaard
Copy link

wedelgaard commented Mar 14, 2017

It seems like create-react-native app has some issues with "react-native-elements". I've tried 2 scenarios which both produces the same error:

Test 1

  • created a new project with create-react-native-app
  • npm i react-native-elements --save
  • Added a react-native-elements button in App.js
  • npm run ios

Test 2

  • created a new project with create-react-native-app
  • npm i react-native-vector-icons --save && react-native link react-native-vector-icons
  • npm i react-native-elements --save
  • Added a react-native-elements button in App.js
  • npm run ios

In both test the simulator throws this warning. I've tried to run the commands described in the error message, but with no luck :(

screen shot 2017-03-14 at 11 02 39

@anp anp added the docs label Mar 14, 2017
@anp
Copy link
Contributor

anp commented Mar 14, 2017

Hi! Thanks for the report. We're working on making it easier to use these transparently in CRNA.

If you first install https://www.npmjs.com/package/@expo/vector-icons and then try using react-native-elements, this should work for you. Note that if/when you eject to a regular RN project, you'll need to switch from Expo's vector icons to the regular react-native-vector-icons.

Let me know if that resolves your immediate issue. In the near future we hope to resolve this more transparently for users.

@wedelgaard
Copy link
Author

@dikaiosune thx got me a little further. Now this issues arrises

screen shot 2017-03-14 at 21 49 21

@brentvatne
Copy link
Member

Hello! Thanks for catching this, we'll add ttf as a default support asset extension in our next release this afternoon.

See this repo for a working example of react-native-elements: https://github.com/exponent/elements-example-crna

The most important part is this: https://github.com/exponent/elements-example-crna/blob/master/app.json#L4-L6 -- if you add it to your app.json and restart the packager (necessary to pick up the changes to the packager options) it should work

@binoy14
Copy link

binoy14 commented Mar 15, 2017

@brentvatne In regards to react-native-elements/react-native-elements#221 I am trying to create documentation on how to use react-native-elements with create-react-native-app. Is the change in the app.json required only till the new release or will that change be required?

@anp
Copy link
Contributor

anp commented Mar 15, 2017

@binoy14 I just released a temporary fix. Going to leave this open until I can fix upstream.

TODO: release new xdl version and update react-native-scripts to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants