ReactNativeアプリのメモ

ReactNative アプリのメモ

View config not found for name div. Make sure to start component names with a capital letter.

  • エラーのソース
render() {
    return (
        <div>123</div>
    );
}

View config not found for name div. Make sure to start component names with a capital letter.
handleException @ ExceptionsManager.js:76
handleError @ InitializeCore.js:69
reportFatalError @ error-guard.js:42
__guard @ MessageQueue.js:299
callFunctionReturnFlushedQueue @ MessageQueue.js:105
(anonymous) @ debuggerWorker.js:72
  • ReactNative で使えない Component を使ってるとのこと

  • 修正

render() {
    return ()
        <View>
            <Text>123</Text>
        </View>
    );
}

config.h’ file not found

  • react-native-snap-carouselの example を確認しようと clone して、example で yarn install した。
    Xcode を開いて、Team も設定などしてもら下記エラーが発生。まだ ReactNative 初心者だが、みたことないエラー

#include "config.h" // to figure out pthreads support

  • 参考サイト
    • https://github.com/facebook/react-native/issues/16097#issuecomment-364947895
  • シェルを実行すると解決するようです。

cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh

Libraries/WebSocket/libfishhook.a

❌  error: Build input file cannot be found: '/Users/ka-yamao/workspace/react-native-snap-carousel/example/node_modules/react-native/Libraries/WebSocket/libfishhook.a'


** BUILD FAILED **



The following build commands failed:

        Libtool /Users/ka-yamao/workspace/react-native-snap-carousel/example/ios/build/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a normal x86_64

  • Xcodeからlibfishhook.aを削除して再度追加すると、パスが正しくなりビルドが成功するみたい
    libfishhook

  • 参考サイト

    • https://github.com/facebook/react-native/issues/19569

crun: error: unable to find utility “instruments”, not a developer tool or in PATH

  • Xcodeが複数あり、パスが設定されていない場合に発生するかも。