ns docotor android throws cocoa pod errors
On a new Mac M1,
% ns doctor android
produces
✔ Getting environment information
No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 8.0.1 version and is up to date.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 12.4.0 satisfies minimum required version 10.
✖ WARNING: There was a problem with CocoaPods
Verify that CocoaPods are configured properly.
Your environment is not configured properly and you will not be able to execute local builds.
same issue on mac m1
@nicoisz are you just wanting to build for Android, or do you need help getting the iOS builds set up?
@EdJones i need help getting the iOS builds set up
Xcode is installed and is configured properly. ✔ xcodeproj is installed and is configured properly. ✔ CocoaPods update is not required. ✔ Your current CocoaPods version is newer than 1.0.0. ✔ Python installed and configured correctly. ✔ The Python 'six' package is found. ✔ Xcode version 12.5.0 satisfies minimum required version 10. ✖ WARNING: CocoaPods is not installed or is not configured properly.
K. This issue is about the error with Doctor and Android, but we can get you fixed up. NS doctor lumps a whole bunch of issues in with this error. Did you do this step?
sudo arch -x86_64 gem install ffi
Then
arch -x86_64 pod install
when i run those commands i get [!] No `Podfile' found in the project directory.
k. Try this: NS doctor tests for problems with CocoaPods by downloading a test folder, and then installing it. Unfortunately, it's not very specific about what it finds. Lots of things can happen, but all it reports is: "WARNING: There was a problem with CocoaPods". Bleh.
To fix the problem, you need to know the error. Heres how to get it:
- Find where npm packages are globally installed:
$ npm list -g | head -1
# /Users/denkan/.nvm/versions/node/v12.18.2/lib
- Find @nativescript/doctor folder.
$ cd /Users/denkan/.nvm/versions/node/v12.18.2/lib
$ cd node_modules/nativescript/node_modules/@nativescript/doctor
$ cd resources/cocoapods-verification/
- Extract the cocoapods.zip and try install
$ unzip cocoapods.zip
$ cd cocoapods
$ pod install
Also, what does your ruby version look like?
$ruby --version
i search for those folders, and i dont have it. node_modules/nativescript/node_modules/@nativescript/doctor resources/cocoapods-verification/
this is the ruby version ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-darwin20]
I think you followed instructions, and installed a new ruby; when the system Ruby would have worked. The X86 is clue.
I'm not at Mac now, but you'll need a ARM64 Ruby.
Mine is ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20] which came from the factory.
@nicoisz Here is the zip file that belongs in that folder: cocoapods.zip
If you do a pod install after putting it there, you should get your real issue.