Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package react-native-onesignal has been ignored because it contains invalid configuration

I am trying to configure OneSignal React Native in a React Native application for push notification purposes.

Environment Setup

  1. react-native version : 0.60
  2. npm version 10.5

I followed the steps below from the official documentation of React native one signal for setting it up:

step 1 : npm install -g react-native-cli, status : done

step 2 : react-native init OneSignalDemo, status : done

Before linking the project I ran my project successfully with the commands below:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
react-native run-android

step 3: While linking my library with react-native link react-native-onesignal I got an error in my terminal. Linking oneSignal with my App (As per official documentation), status : fail

Error:

Package react-native-onesignal has been ignored because it contains invalid configuration. 
Reason: Unknown option dependency.platforms.ios.sourceDir with value ""./ios"" was found. 
This is either a typing error or a user mistake

One possible solution that I tried was to create new React Native project with version 0.58.0 as per documentation, but I keep getting the same error.

like image 979
Hardik Desai Avatar asked Oct 15 '22 13:10

Hardik Desai


1 Answers

i got the warn message but simple npm i solved the issue for me

like image 109
Aayush Bhattacharya Avatar answered Nov 13 '22 08:11

Aayush Bhattacharya