I’m trying to test react native push notification using firebase in android Expo app so when I run expo publish I got this error :
"use strict";
2 |
> 3 | import PushNotificationIOS from "@react-native-community/push-notification-ios";
| ^
4 |
5 | module.exports = {
6 | component: PushNotificationIOS
at ModuleResolver.resolveDependency (C:\Users\...\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:158:15)
at DependencyGraph.resolveDependency (
here is my code :
import messaging from '@react-native-firebase/messaging';
import PushNotification from 'react-native-push-notification'
PushNotification.createChannel({
channelId: Math.round(Math.random() * 1000000),
channelName: "my-channel",
channelDescription: "push notification channel",
playSound: true,
soundName: 'default',
importance: 10,
vibrate: true
},
(created) => console.log(`created channel '${created}`)
)
export const schedulePushNotification = () => {
PushNotification.localNotification({
channelId: Math.round(Math.random() * 1000000),
channelName: 'my channel',
autoCancel: true,
bigText: 'body message ',
subText: '',
title: '⏳ title',
message: 'sub msg...',
playSound: true,
soundName: 'default',
importance: 10,
vibrate: true,
vibration: 1000,
})
}
anyone have an idea about the issue !!