Skip to content

References of removed dependencies are not deleted from Podfile #5153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Fatme opened this issue Nov 21, 2019 · 2 comments
Open

References of removed dependencies are not deleted from Podfile #5153

Fatme opened this issue Nov 21, 2019 · 2 comments

Comments

@Fatme
Copy link
Contributor

Fatme commented Nov 21, 2019

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.2.0
  • Cross-platform modules: 6.2.0
  • Android Runtime: 6.2.0
  • iOS Runtime:
  • Plugin(s):

Describe the bug
When a dependency is uninstalled, its reference is not deleted from Podfile in platforms and that leads to the error when trying to run the application on device.

To Reproduce

  1. tns create myApp --js
  2. tns prepare ios
  3. npm i [email protected]
  4. tns prepare ios
  5. You will see the following log in the output:
[!] CocoaPods could not find compatible versions for pod "MaterialComponents/Tabs":
  In snapshot (Podfile.lock):
    MaterialComponents/Tabs (= 92.4.0, ~> 92.3)

  In Podfile:
    MaterialComponents/Tabs (~> 84.4)

    MaterialComponents/Tabs (~> 92.3)

None of your spec sources contain a spec satisfying the dependencies: `MaterialComponents/Tabs (~> 92.3), MaterialComponents/Tabs (~> 84.4), MaterialComponents/Tabs (= 92.4.0, ~> 92.3)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

[!] There are duplicate dependencies on `MaterialComponents/Tabs` in `Podfile`:

- MaterialComponents/Tabs (~> 92.3)
- MaterialComponents/Tabs (~> 84.4)

and the content of Podfile is the following:

use_frameworks!

target "newPodfileIssue" do
# NativeScriptPlatformSection /Users/myuser/Work/nativescript-cli/scratch/newPodfileIssue/node_modules/@nativescript/core/platforms/ios/Podfile with 9.0
platform :ios, '9.0'
# End NativeScriptPlatformSection


# Begin Podfile - /Users/myuser/Work/nativescript-cli/scratch/newPodfileIssue/node_modules/@nativescript/core/platforms/ios/Podfile
# platform :ios, '9.0'
use_frameworks!

pod 'MaterialComponents/Tabs', '~> 92.3'
# End Podfile

# Begin Podfile - /Users/myuser/Work/nativescript-cli/scratch/newPodfileIssue/node_modules/tns-core-modules/platforms/ios/Podfile
# platform :ios, '9.0'
use_frameworks!

pod 'MaterialComponents/Tabs', '~> 84.4'
# End Podfile

Expected behavior

It should work and the reference to /Users/myuser/Work/nativescript-cli/scratch/newPodfileIssue/node_modules/@nativescript/core/platforms/ios/Podfile should be deleted from Podfile.

@Siafu
Copy link

Siafu commented Dec 13, 2019

I am having the exact issue as well.

@Fatme
Copy link
Contributor Author

Fatme commented Dec 14, 2019

@Siafu,

One (not recommend) way to workaround this problem is to delete platforms directory -> rm -rf platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants