6.7 C
New York
Friday, November 15, 2024

ios – Uncaught Error: Element ‘Privont’ has not been registered in React Native App


I am getting the next error in my React Native app:

“Uncaught Error: ‘Privont’ has not been registered. This will occur if:

  • Metro (the native dev server) is run from the mistaken folder. Examine if Metro is operating, cease it and restart it within the present venture.
  • A module didn’t load as a consequence of an error and AppRegistry.registerComponent wasn’t referred to as.”

I’ve checked my code, and plainly "Privont" hasn’t been registered. Right here’s what I’ve tried thus far:

  • Restarted the Metro bundler.
  • Verified that I’m operating Metro within the right venture listing.
  • Checked the AppRegistry.registerComponent name in my code.

The error factors to AppRegistry.js at line 205.

Right here is my code:

1. index.js

import * as React from 'react';
import {AppRegistry} from 'react-native';
import App from './App';
import {title as appName} from './app.json';
import './Core/translations/i18next';
import {Supplier} from 'react-redux';
import {PersistGate} from 'reduxjs-toolkit-persist/integration/react';
import {persistedStore, retailer} from './src/redux/retailer';

const AppWrapper = () => (
  
    
      
    
  
);

AppRegistry.registerComponent(appName, () => App);

2. app.json

{
  "title": "Privont",
  "displayName": "Privont"
}

3. AppDelegate.mm

@implementation AppDelegate

- (BOOL)utility:(UIApplication *)utility didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FIRApp configure];
  // Add this line to name the above operate
    ClearKeychainIfNecessary();
  self.moduleName = @"Privont";
  // You possibly can add your customized preliminary props within the dictionary beneath.
  // They are going to be handed all the way down to the ViewController utilized by React Native.
  self.initialProps = @{};

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

Right here is the error picture : See Picture

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles