customerio / customerio-expo-plugin

MIT License
12 stars 9 forks source link

There are multiple dependencies with different sources for `customerio-reactnative` in `Podfile`: #124

Closed dannyhw closed 7 months ago

dannyhw commented 7 months ago

Getting this error when installing pods

⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: There are multiple dependencies with different sources for `customerio-reactnative` in `Podfile`:

- customerio-reactnative (from `../node_modules/customerio-reactnative`)
- customerio-reactnative/apn (from `../../node_modules/customerio-reactnative`)

If I manually remove

# --- CustomerIO Host App START ---
  pod 'customerio-reactnative/apn', :path => '../../node_modules/customerio-reactnative'
# --- CustomerIO Host App END ---

Then pods install correctly but the app fails to build

ami-aman commented 7 months ago

Hi @dannyhw

Thanks for reaching out. I apologise for the inconvenience caused. To help you further I would need more information regarding the issue and the setup:

dannyhw commented 7 months ago

Version of customerio-expo-plugin that your app is using

Another thing is that if I adjust the path to be this one then it seems to work.

pod 'customerio-reactnative/apn', :path => '../node_modules/customerio-reactnative'
ami-aman commented 7 months ago

Thanks for the prompt response. @dannyhw ! I appreciate it.

I have one last question before I can start investigating the issue. Is your project a monorepo ? Also, would you be able to share the customerio-expo-plugin snippet from app.json and the podfile for us to start investigating ? If you are not comfortable sharing the information here, you may also drop us the details on win@customer.io and mention this ticket number.

dannyhw commented 7 months ago

Yeah its a mono repo, I think its actually caused by customer-expo-plugin and customerio-reactnative being in different node_modules folders.

Though we just updated expo and I stopped getting this issue which is weird. Need to double check but might not really be a blocker anymore.

heres the app config

     [
        "customerio-expo-plugin",
        {
          android: {
            googleServicesFile: "./google-services.json",
          },
          ios: {
            pushNotification: {
              useRichPush: false,
              env: {},
            },
          },
        },
      ], 

This is the only thing that was in the podfile

# --- CustomerIO Host App START ---
  pod 'customerio-reactnative/apn', :path => '../../node_modules/customerio-reactnative'
# --- CustomerIO Host App END ---
ami-aman commented 7 months ago

Thank you for the update. It's great to hear that you've resolved the issue and it's no longer a blocker for you.

Our expo plugin automatically locates the relative path to customerio-reactnative and includes it in your podfile in the format pod customerio-reactnative/apn. The presence of both customerio-expo-plugin and customerio-reactnative in separate node_modules directories may have been the cause of the issue.

Since you've successfully resolved the issue, I'll go ahead and close the ticket. If you need further assistance, feel free to reopen the ticket or reach out to us at win@customer.io.