NativeScript / NativeScript/nativescript-cli
References of removed dependencies are not deleted from Podfile
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.1k
- Forks
- 204
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 8
Descripción
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
tns create myApp --jstns prepare iosnpm i tns-core-modules@6.1.0tns prepare ios- 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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el flujo de generación y limpieza del Podfile utilizado por tns prepare ios, centrándote en el Podfile generado bajo platforms. Reproduce los pasos de desinstalación y cambio de versión del issue y, a continuación, verifica que no haya referencias a dependencias eliminadas de node_modules y que la preparación ya no informe de pods duplicados o incompatibles.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- ios, javascript
- Área
- cli, mobile
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100