Can't add platforms after updating to {N} 4.1.0

nativescriptcore
ios
android

#1

After updating to the new version of NativeScript I can NOT add platforms and deploy my app!

Global packages:

  • nativescript@4.1.0
  • npm@6.1.0
  • tns-adroid@4.1.3
  • tns-ios@4.1.0

Output from ( tns doctor ):

✔ 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.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 4.1.0 version and is up to date.
✔ Component tns-core-modules has 4.1.0 version and is up to date.
✖ Component tns-android is not installed.
✖ Component tns-ios is not installed.

Their is no "platforms" or "tns-<platform>" object/property listed in my package.json.

Running tns platform add ios (or android) outputs the following.

Copying template files...
⠋ Installing tns-ios
Command npm install tns-ios@4.1.0 --silent --save-exact --save failed with exit code 243
# tns platform add

#2

This does work though :face_with_raised_eyebrow:

tns create sampleProject
cd sampleProject
tns run ios

So it must have something to do with my existing app.


#3

What is exit code 243?


#4

Deleted application from my local machine and re-cloned. Now platform add works and deploys to device.

But doesn’t actually open and run. Terminal gets stuck at Refreshing application...


#5

Solved

(sort of)

Hard to know (for me) exactly what was causing this. I seemed to have some Apple ID / iCloud conflict on my phone. And when I attempted to build from Xcode I got an unable to build for this device notification.

It seemed I had updated my iPhone OS and needed to update Xcode as well. I also had some account conflicts and needed to completely restore my iPhone :frowning:

Did both, built from Xcode and now tns commands seem to be executing as expected.

For the next dev that comes looking.

If your experiencing the same problem, save yourself some time and go attempt to build from Xcode. If that doesn’t work you may have a conflict from your device OS version and Xcode. Check to see if there’s any new versions available, download and install if there is.

So basically I don’t think this error was coming from NativeScript, or any npm versions/packages (But it may have). It was likely just a coincidence that the iOS/Xcode conflict kicked in when I upgraded NativeScript.