Help us understand the problem. What is going on with this article?

Expo/CRNA+NativeBaseのIcon(Ionicons)使用時にエラー

More than 1 year has passed since last update.

エラー内容

Device: (1:0) Error loading dependency: Error: Failed to install module 'native-base': Attempted to import missing module '@expo/vector-icons/Ionicons'

対応

最初に読み込んでおく

import { Font } from 'expo';
import { Ionicons } from '@expo/vector-icons'

async componentWillMount() {
  await Font.loadAsync(Ionicons.font);
}

参考

HorieH
自分用のメモが多い ReactNativeでゲーム作ってます 猫が好き 履歴: Perl→PHP(CakePHP2,3)→AWS(ソリューションアーキテクト)、Lambda(Python)→JS(React/ReactNative/Redux)
https://horieapp.firebaseapp.com
admin-guild
「Webサービスの運営に必要なあらゆる知見」を共有できる場として作られた、運営者のためのコミュニティです。
https://admin-guild.slack.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away