Skip to content

App throws an error after run initial with a minimal example #256

@sebastianhoeck

Description

@sebastianhoeck

Version

1.1.0

Platform

iOS

OS version

iOS 13

General versions

  1. react-native: 068.0
  2. react: 17.0.2
  3. beacon library: 1.1.0
  4. pod. 1.11.3
  5. npm: 9.2.0
  6. node: 18.1.0

Steps to reproduce

  1. react-native init myTestApp --version=0.68.0
  2. Add library version 1.1.0 ("react-native-beacons-manager": "git://github.com/MacKentoch/react-native-beacons-manager.git#53c1bda")
  3. cd ios && pod install
  4. add minimal example
import React from 'react';

import {Text, View} from 'react-native';

import {Beacons} from 'react-native-beacons-manager';

const App = ({route, navigation}) => {
    Beacons.requestAlwaysAuthorization();
    Beacons.allowsBackgroundLocationUpdates(true);

    return (
        <View>
          <Text style={{color: 'white', top: 150}}>test</Text>
        </View>
    );
};

export default App;

Expected behavior

The app should be started successfully

Actual behavior

I get the following errors:

Error: Requiring module "node_modules/react-native-beacons-manager/index.js", which threw an exception: Invariant Violation: `new NativeEventEmitter()` requires a non-null argument. 

TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[2], "react-native-beacons-manager").Beacons')

I have used the library several times in my projects. But now I get the mentioned error and don't know why. I have even created a minimal example. This is described above. But still I have the error. Does anyone know why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions