Open uxshahil opened 1 year ago
Describe the bug When trying to call Notifications.Push.enable() from the index.ts React Native project, the following error is produced.
ERROR TypeError: _notifications.Notifications.Push.enable is not a function (it is undefined), js engine: hermes
To Reproduce Steps to reproduce the behavior:
Expected behavior The function is called without an error
Screenshots
Desktop (please complete the following information):
Additional context { "name": "projectname", "version": "1.0.0", "main": "./index.ts", "scripts": { "start": "expo start", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web" }, "dependencies": { "@aws-amplify/rtn-push-notification": "^1.1.7", "@expo-google-fonts/poppins": "^0.2.3", "@expo-google-fonts/ubuntu": "^0.2.3", "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@fortawesome/react-native-fontawesome": "^0.3.0", "@microsoft/signalr": "^7.0.10", "@react-native-async-storage/async-storage": "^1.19.3", "@react-native-community/masked-view": "^0.1.11", "@react-native-community/netinfo": "^9.4.1", "@react-native-community/push-notification-ios": "^1.11.0", "@react-navigation/native": "^6.1.7", "@react-navigation/stack": "^6.3.17", "@reduxjs/toolkit": "^1.9.5", "amazon-cognito-identity-js": "^6.3.6", "aws-amplify": "^5.3.11", "axios": "^1.5.0", "expo": "~49.0.10", "expo-application": "~5.3.0", "expo-constants": "~14.4.2", "expo-device": "~5.4.0", "expo-font": "~11.4.0", "expo-localization": "~14.3.0", "expo-splash-screen": "~0.20.5", "expo-status-bar": "~1.6.0", "expo-system-ui": "^2.6.0", "i18next": "^23.5.1", "intl-pluralrules": "^2.0.1", "nativewind": "^2.0.11", "postcss": "^8.4.23", "react": "18.2.0", "react-hook-form": "^7.47.0", "react-i18next": "^13.2.2", "react-native": "0.72.4", "react-native-config": "^1.5.1", "react-native-gesture-handler": "~2.12.0", "react-native-get-random-values": "^1.9.0", "react-native-mmkv": "^2.10.2", "react-native-root-toast": "^3.5.1", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-splash-screen": "^3.3.0", "react-native-svg": "13.9.0", "react-native-svg-transformer": "^1.1.0", "react-native-url-polyfill": "^2.0.0", "react-redux": "^8.1.2", "uuid": "^9.0.1" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/eslint-config": "^0.72.2", "@react-native/metro-config": "^0.72.11", "@tsconfig/react-native": "^3.0.0", "@types/react": "^18.0.24", "@types/react-redux": "^7.1.26", "@types/react-test-renderer": "^18.0.0", "@types/uuid": "^9.0.5", "autoprefixer": "^10.4.15", "babel-jest": "^29.2.1", "babel-plugin-module-resolver": "^5.0.0", "eslint": "^8.19.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "^0.76.8", "prettier": "^2.4.1", "react-test-renderer": "18.2.0", "tailwindcss": "3.3.2", "typescript": "4.8.4" }, "resolutions": { "react-devtools-core": "4.28.0" }, "private": true }
Same error...
@uxshahil are you able to fix it ?
Describe the bug When trying to call Notifications.Push.enable() from the index.ts React Native project, the following error is produced.
ERROR TypeError: _notifications.Notifications.Push.enable is not a function (it is undefined), js engine: hermes
To Reproduce Steps to reproduce the behavior:
Expected behavior The function is called without an error
Screenshots
Desktop (please complete the following information):
Additional context { "name": "projectname", "version": "1.0.0", "main": "./index.ts", "scripts": { "start": "expo start", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web" }, "dependencies": { "@aws-amplify/rtn-push-notification": "^1.1.7", "@expo-google-fonts/poppins": "^0.2.3", "@expo-google-fonts/ubuntu": "^0.2.3", "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@fortawesome/react-native-fontawesome": "^0.3.0", "@microsoft/signalr": "^7.0.10", "@react-native-async-storage/async-storage": "^1.19.3", "@react-native-community/masked-view": "^0.1.11", "@react-native-community/netinfo": "^9.4.1", "@react-native-community/push-notification-ios": "^1.11.0", "@react-navigation/native": "^6.1.7", "@react-navigation/stack": "^6.3.17", "@reduxjs/toolkit": "^1.9.5", "amazon-cognito-identity-js": "^6.3.6", "aws-amplify": "^5.3.11", "axios": "^1.5.0", "expo": "~49.0.10", "expo-application": "~5.3.0", "expo-constants": "~14.4.2", "expo-device": "~5.4.0", "expo-font": "~11.4.0", "expo-localization": "~14.3.0", "expo-splash-screen": "~0.20.5", "expo-status-bar": "~1.6.0", "expo-system-ui": "^2.6.0", "i18next": "^23.5.1", "intl-pluralrules": "^2.0.1", "nativewind": "^2.0.11", "postcss": "^8.4.23", "react": "18.2.0", "react-hook-form": "^7.47.0", "react-i18next": "^13.2.2", "react-native": "0.72.4", "react-native-config": "^1.5.1", "react-native-gesture-handler": "~2.12.0", "react-native-get-random-values": "^1.9.0", "react-native-mmkv": "^2.10.2", "react-native-root-toast": "^3.5.1", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-splash-screen": "^3.3.0", "react-native-svg": "13.9.0", "react-native-svg-transformer": "^1.1.0", "react-native-url-polyfill": "^2.0.0", "react-redux": "^8.1.2", "uuid": "^9.0.1" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/eslint-config": "^0.72.2", "@react-native/metro-config": "^0.72.11", "@tsconfig/react-native": "^3.0.0", "@types/react": "^18.0.24", "@types/react-redux": "^7.1.26", "@types/react-test-renderer": "^18.0.0", "@types/uuid": "^9.0.5", "autoprefixer": "^10.4.15", "babel-jest": "^29.2.1", "babel-plugin-module-resolver": "^5.0.0", "eslint": "^8.19.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "^0.76.8", "prettier": "^2.4.1", "react-test-renderer": "18.2.0", "tailwindcss": "3.3.2", "typescript": "4.8.4" }, "resolutions": { "react-devtools-core": "4.28.0" }, "private": true }