I was trying to create a dev build for an expo app locally by running npx expo run:ios, but this kept failing with the following error:
⚠️ Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: unexpected token at ''
... Something-something ... :27
# else
# origin_autolinking_method.call()
# end
After some time spent debugging, installing a newer ruby version, re-installing cocoapods and nuking whatever cache I could think of, it turned out to be due to the VS Code Auto-Attach setting in the terminal, that I had set to “Smart”.
Well, somehow this was causing problems installing the pods. So not that smart of me 🙂
Disabling the Auto Attach fixed it.
Note to self – leave the Auto Attach to the flag option by default, and run things in the external console in case of strange failures.

Leave a Reply