react-native-push-notification / ios

React Native Push Notification API for iOS.
MIT License
734 stars 282 forks source link

Unable to resolve module `@react-native-community/push-notification-ios` from `src/App.js` #246

Open rmathias86 opened 3 years ago

rmathias86 commented 3 years ago

Hey guys,

I've been trying to use this lib but I'm getting this simple error

Unable to resolve module@react-native-community/push-notification-iosfromsrc/App.js: @react-native-community/push-notification-ios could not be found within the project or in these directories: node_modules/@react-native-community

App.js import import PushNotificationIOS from "@react-native-community/push-notification-ios";

I've followed the all installation instructions in the readme, but npm i instead of yarn add. In fact, node_modules contains @react-native-community/push-notification-ios.

Has any one faced the problem before? All other @react-native-community libs works fine for me.

"react": "^16.13.1", "react-native": "0.62.2", "@react-native-community/push-notification-ios": "^1.8.0",

Axenu commented 3 years ago

Have you had any luck solving your problem? I encountered the same error today.

rmathias86 commented 3 years ago

Have you had any luck solving your problem? I encountered the same error today.

No, I havent solved yet.

jdvvaghelaoffice commented 3 years ago

Try npm install @react-native-community/push-notification-ios, because its working fine with me

rmathias86 commented 3 years ago

Try npm install @react-native-community/push-notification-ios, because its working fine with me

Thanks @JDJBSPL, I've followed the installation instructions step-by-step, no luck

I don't think the lib itself is causing the problem, but a configuration in my project... no idea what!

Found this, https://github.com/zo0r/react-native-push-notification/issues/1176 but didnt help.

threefeetcat commented 3 years ago

I encountered the same error - by removing /ios/* from resolver blacklist, it works.

lucas0205 commented 3 years ago

npm install @react-native-community/push-notification-ios --legacy-peer-deps worked for me

taine-zuse commented 2 years ago

npm install @react-native-community/push-notification-ios --legacy-peer-deps

This worked for me thank you

ilyalezhnev commented 1 year ago

npm install @react-native-community/push-notification-ios --legacy-peer-deps worked for me

It works, thanks!

naveedHashmi commented 1 year ago

It works for me, thanks!

dharni1181 commented 1 month ago

not worked for me

npm install @react-native-community/push-notification-ios --legacy-peer-deps worked for me