{"id":137,"date":"2015-09-15T19:04:39","date_gmt":"2015-09-15T19:04:39","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=137"},"modified":"2015-09-15T19:04:39","modified_gmt":"2015-09-15T19:04:39","slug":"upgrading-to-nativescript-v-next-from-pre-release-nightly-masters","status":"publish","type":"post","link":"https:\/\/fluentreports.com\/blog\/?p=137","title":{"rendered":"Upgrading to NativeScript v.Next  (From pre-release nightly masters)"},"content":{"rendered":"<p>Please note these are how to install the newest pre-release; based on my experience with the current nightly pre-release masters available at <a href=\"http:\/\/nativescripts.rocks\">http:\/\/nativescripts.rocks<\/a>.<\/p>\n<p>The first thing you <strong>MUST<\/strong> do is upgrade your NativeScript Command Line utility, first.\u00a0\u00a0\u00a0\u00a0 The easist way is to do a: <strong>npm remove nativescript -g<\/strong><\/p>\n<p>Yes, we need to de-install the current version; trust me it is easier this way.<\/p>\n<p>Next thing if you are doing anything with Android; you want to do is type \"gradle\" and see if it runs.\u00a0 If it doesn't run from the command line you need to either install <a href=\"https:\/\/gradle.org\/\">gradle<\/a> or set your path to use it.\u00a0\u00a0 If you have Android Studio installed; gradle is including with Android Studio, so you don't have to install it again.\u00a0 For example on my Windows machine; my gradle is located at: <em>C:\\Program Files (x86)\\Android\\android-studio\\gradle\\gradle-2.4\\bin. \u00a0<\/em> If you are using Ubuntu, the version included is really old and you will need to install a ppa from: <a href=\"https:\/\/launchpad.net\/~cwchien\/+archive\/ubuntu\/gradle\">https:\/\/launchpad.net\/~cwchien\/+archive\/ubuntu\/gradle<\/a> Then you will be able to do a <strong>sudo apt-get update &amp;&amp; sudo apt-get install gradle<\/strong> and get a much more recent version.\u00a0\u00a0 On a Macintosh, it is recommended you install <a href=\"http:\/\/brew.sh\/\">brew<\/a>, and then do a <strong>brew install gradle<\/strong>.\u00a0\u00a0 You can alternatively download and install it directly from <a href=\"https:\/\/gradle.org\/\">https:\/\/gradle.org\/<\/a><\/p>\n<p>The next thing you need to make sure is that you have your ANDROID_HOME and JAVA_HOME environmental variables set.\u00a0\u00a0 If you don't have them set you will get WEIRD unrelated errors when trying to do things with the new version of the NativeScript command line tool.<\/p>\n<p>Then you download the latest master <strong>nativescript-cli-master.tgz<\/strong> from <a href=\"http:\/\/nativescripts.rocks\">nativescript.rocks<\/a>.\u00a0 Then type:\u00a0 <strong>npm install nativescript-cli-master.tgz -g<\/strong><\/p>\n<p>If everything worked fine; you should be able to do: <strong>tns --version<\/strong> and you will see\u00a0 the next version number plus \"non-ci\".<\/p>\n<p>Now that you have your updated command line; you next want to download your platform(s); <a href=\"http:\/\/nativescript.rocks\/master\/tns-android-master.tgz\">tns-android-master.tgz<\/a> and\/or <a href=\"http:\/\/nativescript.rocks\/master\/tns-ios-master.tgz\">tns-ios-master.tgz<\/a>. \u00a0 You will next need to do a<br \/>\n<strong>tns platform remove android<\/strong> ----- WARNING!!!\u00a0 THIS WILL DELETE EVERYTHING IN YOUR platform\/android folder.\u00a0\u00a0 If you have anything you customized (i.e. like the androidmanifest.xml file); you will want to copy it out first... WARNING!!!!<\/p>\n<p>Then you can run <strong>tns platform add android --frameworkPath=tns-android-master.tgz<\/strong> assuming the tns-android-master.tgz file is in the same folder where you are running the tns command.\u00a0\u00a0\u00a0 Please note the --frameworkPath is case sensitive; and you need to point it to the entire path wherever the tns-android-master.tgz or tns-ios-master.tgz files are located at.\u00a0\u00a0 I typically put them in the parent folder that contains all my nativescript project folders, so then I can do <strong>tns platform add android --frameworkPath=..\/tns-android-master.tgz <\/strong>from any of the projects.<\/p>\n<p>The final piece is updating the common core (tns-core-modules-master.tgz).\u00a0 Now in some cases you can skip installing the new CLI &amp; Runtimes and just use the core.\u00a0 I haven't tried to see if the new common core library is compatible with the older runtimes; but I in a lot of cases initially they are compatible, but close to the middle of the development they typically are now relying on a new feature exposed in the the runtimes.\u00a0\u00a0 So it is always safer to keep the updated together.<\/p>\n<p>In version 1.3 the tns_module folder in the app folder has been depreciated and is no longer used.\u00a0\u00a0 So you can just delete the app\/tns_modules folder.\u00a0\u00a0 The new location is in the node_modules folder; so you can now do a <strong>npm install tns-core-modules-master.tgz<\/strong><\/p>\n<p>And finally after everything is all done; you do a:<br \/>\n<strong>tns prepare android <\/strong><br \/>\nand\/or<br \/>\n<strong>tns prepare ios<\/strong><\/p>\n<p>And you are now running on the latest masters!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Please note these are how to install the newest pre-release; based on my experience with the current nightly pre-release masters available at http:\/\/nativescripts.rocks. The first thing you MUST do is upgrade your NativeScript Command Line utility, first.\u00a0\u00a0\u00a0\u00a0 The easist way is to do a: npm remove nativescript -g Yes, we need to de-install the current&hellip; <a class=\"more-link\" href=\"https:\/\/fluentreports.com\/blog\/?p=137\">Continue reading <span class=\"screen-reader-text\">Upgrading to NativeScript v.Next  (From pre-release nightly masters)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=137"}],"version-history":[{"count":2,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":139,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions\/139"}],"wp:attachment":[{"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}