question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker Ionic/Vue iOS build fails due to missing Capacitor module.

See original GitHub issue

Bug 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:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
michaelalhillycommented, Nov 2, 2020

Here’re are the steps I had to take to resolve this issue:

1. Deleted the ios directory to start over
2. ionic build
3. ionic cap add ios
4. ionic cap copy
5. Copy Podfile contents to temp file
6. Navigate to ios/App directory
7. Delete Podfile, Podfile.lock, and Pods directory
8. Switch to mac terminal session (from Docker)
9. pod init (now there's a working pod build, but no Capacitor)
10. pod install
11. Paste Podfile contents back to Podfile
12. pod update (now the Capacitor files have been added)
13. Open ios/App directory in Xcode (didn't realize this was important)
14. Update Signing Team
15. Follow prompts to add recommended changes
16. Connect iPhone and select
17. Build and run project

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.

0reactions
ionitron-bot[bot]commented, Nov 11, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Capacitor 4 plugin in upgraded app fails build, no such ...
I built a new Capacitor plugin, using the V4 model. (on Sunday) is compiles and checks out fine. no errors.
Read more >
No such module 'Capacitor' in AppDelegate.swift
I opened the app using this command: ionic cap open ios and got an error: No module Capacitor found , but anyway I...
Read more >
build ios ionic capacitor app Code Example - Code Grepper
ionic capacitor build android // Once Android Studio launches // click on Build -- >Build Bundle /Apk ... Answers related to “build ios...
Read more >
Ionic Forum - Latest topics - RSSing.com
Hi, i try to install dev dependecy in proyect mount in docker (Windows 11 - Docker desktop) but have the next error:
Read more >
A curated list of awesome things related to Vue.js
This template includes the VueJS client app and a backend API controller. vue-reddit-app A Reddit SPA demo built with Vue 2.X , Vue...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found