No podspec found for CapacitorApp super simple app

Hi ionic, I have my first very, very simple mobile app I’m trying to build on codemagic and I’m stuck at Cocoapods installation. I am long time web developer but know nothing about mobile or podfiles this is all basic/default ionic/codemagic stuff, so apologies if too much info. I’m just trying to get the ipa file.

Analyzing dependencies
[!] No podspec found for `CapacitorApp` in `..\..\node_modules\@capacitor\app`

Build failed :|
Step 4 script `Cocoapods installation` exited with status code 1

This is step 2 in the codemagic yaml:

        - name: Install npm dependencies for Ionic project
          script: |
            npm install
        - name: Cocoapods installation
          script: |
            cd ios/App && pod install
        - name: Update dependencies and copy web assets to native project
          script: |
            # npx cap copy # <- use this is you don't need to update native dependencies
            npx cap sync # <- update native dependencies and copy web assets to native project

in ios/App/Podfile, capacitorApp is the 3rd line:

def capacitor_pods
  pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
  pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
  pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
  pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
  pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
  pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'

and CapacitorApp.podspec absolutely exists at node-modules/@capacitor/app do |s| = 'CapacitorApp'
  s.version = package['version']

package.json dependencies:

    "@capacitor/app": "^4.0.0",
    "@capacitor/assets": "^2.0.4",
    "@capacitor/core": "^4.0.0",
    "@capacitor/haptics": "^4.0.0",
    "@capacitor/ios": "^4.0.0",
    "@capacitor/keyboard": "^4.0.0",
    "@capacitor/status-bar": "^4.0.0",

Any suggestions I would be super grateful.
Thank you.

I installed a whole new ionic project and tested in codemagic and pods installed correctly, so I updated capacitor versions in package.json and it seems to be working. On to the next problem, thank you.