Search code examples
react-nativeaugmented-realityviro-react

Invariant Violation: requireNativeComponent: 'VRTText' was not found in the UImanager


I'm working with [email protected] [email protected] in building an AR Application. I followed the steps in the documentation Viro-Quick-Start-Windows and when I try to bundle and build the app it's showing this error. I also referred to Viromedia/viro but it doesn't work.

When I start the app this is the screen that I see enter image description here

When I select AR in the desired experience it shows the following error messagae enter image description here


Solution

  • I fixed this error by following these steps

    • Go to : node_modules/metro-config/src/defaults/backlist.js and replace

    sharedBlacklist

    with this:

    var sharedBlacklist = [
      /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
      /website\/node_modules\/.*/,
      /heapCapture\/bundle\.js/,
      /.*\/__tests__\/.*/
    ];
    

    Open a terminal and run:

    react-native start
    
    • Wait for the dependency graph to load,

    Open one more terminal and run:

    react-native run-android --variant=gvrDebug