Docker Ionic/Vue iOS build fails due to missing Capacitor module.
See original GitHub issueBug Report
Ionic version: @ionic/vue: 5.4.1
Current behavior:
Can not build ios app based on the Ionic Vue guide here.
Is this issue caused by using Ionic inside Docker?
I’m receiving errors in Xcode stating there are missing pod files. When I attempt to generate the pod files using pod update and install I’m receiving the following error:
No podspec found for `Capacitor` in `../../node_modules/@capacitor/ios`
The node module and podspec both exist.
In Xcode I’m seeing the following error:
Swift Compiler error: No such module 'Capacitor'
Expected behavior:
The project should build without needing to manually generate pod files according to the Ionic guide.
Steps to reproduce:
Download repo below Install node modules Build ios project Build Xcode project
Related code:
Here’s the link to the repo: https://github.com/michaelalhilly/photoly
Other information:
Everything is building with no errors and running in the browser.
Ionic info:
Ionic:
Ionic CLI : 6.12.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 5.4.1
Capacitor:
Capacitor CLI : 2.4.2
@capacitor/core : 2.4.2
Utility:
cordova-res : 0.15.1
native-run : 1.2.2
System:
NodeJS : v12.18.3 (/usr/local/bin/node)
npm : 6.14.6
OS : Linux 4.19 (this is the Docker OS)
macOS: 10.15.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Here’re are the steps I had to take to resolve this issue:
I think this issue is related to running Ionic in Docker. Since cocaopds is not available in Docker the ionic-cli may not be completing the pods setup, which is understandable.
Additionally, due to lack of experience I was opening the project in Xcode via the ios/App/App.xcodeproj file. However, it seems you have to open the project from the ios/App directory to ensure Xcode can identify the Pods directory.
Everything seems to be working.
If you can please let me know if my understanding is correct or if there is a way to build the project correctly from within Docker.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.