React native TypeError:null不是对象(正在计算';ForegroundServiceModule.createNotificationChannel';)

React native TypeError:null不是对象(正在计算';ForegroundServiceModule.createNotificationChannel';),react-native,foreground-service,React Native,Foreground Service,我正在使用库来运行前台任务 const channelConfig = { id: 'channelId', name: 'Channel name', description: 'Channel description', enableVibration: false }; VIForegroundService.createNotificationChannel(channelConfig); 当我运行我从文档中得到的这部分代码时,发生了错误,我不知道为什么

我正在使用库来运行前台任务

const channelConfig = {
    id: 'channelId',
    name: 'Channel name',
    description: 'Channel description',
    enableVibration: false
};
VIForegroundService.createNotificationChannel(channelConfig);

当我运行我从文档中得到的这部分代码时,发生了错误,我不知道为什么?您遇到此问题了吗?

错误是什么,请详细解释并发送您的错误please@MeisamSaba可能的未处理承诺拒绝(id:0):TypeError:null不是对象(正在评估“ForegroundServiceModule.createNotificationChannel”)