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.

Invalid `Podfile` file: cannot load such file -- /Users/admin/CapProject/node_modules/@capacitor/ios/scripts/pods_helpers.

See original GitHub issue

Bug Report

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 4.0.0
  @capacitor/core: 4.0.0
  @capacitor/android: 4.0.0
  @capacitor/ios: 4.0.0

Installed Dependencies:

  @capacitor/cli: 4.0.0
  @capacitor/core: 4.0.0
  @capacitor/android: 4.0.0
  @capacitor/ios: 4.0.0

Platform(s)

iOS

Current Behavior

I successfully upgraded from Capacitor v3 to v4 following the step-by-step Upgrade Guides on the Capacitor Documentation. But when I run npx cap sync ios or ionic cap sync ios, it run into the following error

✖ Updating iOS native dependencies with pod install - failed!
✖ update ios - failed!
[error] 
        [!] Invalid `Podfile` file: cannot load such file --
        /Users/admin/CapProject/node_modules/@capacitor/ios/scripts/pods_helpers.
        
        #  from
        /Users/admin/CapProject/ios/App/Podfile:1
        #  -------------------------------------------
        >  require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
        #
        #  -------------------------------------------

it seems the node_modules/@capacitor/ios/scripts/pods_helpers file is missing in the current release.

Expected Behavior

Should install, copy and sync dependencies for ios.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
jcesarmobilecommented, Jul 27, 2022

How did you migrate? That step is not documented for the step to step guide, should only happen if you used npx cap migrate command.

As workaround you can remove the require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers' line and this block

post_install do |installer|
    assertDeploymentTarget(installer)
  end
2reactions
jcesarmobilecommented, Jul 29, 2022

@capacitor/ios 4.0.1 is now out with the fix, you can run migrate command again (update @capacitor/cli to 4.0.1 first) and it will add the failing code if you removed it and fix other issues it caused on android themes

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask Question - Stack Overflow
I ran npm audit fix and it added react_native_pods file and pod install then worked.
Read more >
EAS Error: Invalid `Podfile` file: cannot load such file -- /Users ...
1 (peer dependency). eas build crashes during the Install pods step with the following error message: Installing pods [!] Invalid `Podfile` file: ...
Read more >
[!] Invalid `Podfile` file: cannot load such file -- /Users/apps ...
Somebody already faced this on 'pod install'? I am trying to install mobile-previewer. [!] Invalid Podfile file: cannot load such file ...
Read more >
pod setup fails with "cannot load such file - Google Groups
Cocoapods is a dependency I need for Flutter. Previous installations were a breeze but after upgrading Ruby to 3.1.0 `pod install` fails ...
Read more >
Cocpods error - Builds - Bitrise Discussions
Bitrise Build Issue Report template im getting [!] Invalid Podfile file: cannot load such file ...
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