Cleanly downgrade Nativescript to 2.5 - nativescript

since I have some issues with my app (that worked perfectly in 2.5) after upgrading TNS to 3.0 (I used the barcode scanner and the Xing decoder plugins both), I have the need to bring back my environment exactly as it was before upgrade.
But I haven't find an official way to cleanly perform 2.5 downgrade.
Someone can help me ? Thanks in advance

Try the following steps:
npm uninstall -g nativescript
npm cache clean
npm i -g nativescript#2.5.0
remove node_modules platforms directory in your project
revert your package.json to the version before update to 3.0(angular, typescript versions...)
tns platform add android#2.5.0
tns platform add ios#2.5.0
tns run ios or android
You can also check this blog for further instructions http://fluentreports.com/blog/?p=509

Related

Flutter_CLI: Because every version of flutterfire_cli depends on xml >=5.3.0 which requires SDK version >=2.14.0 <3.0.0, flutterfire_cli is forbidden

I am trying to install firebase_cli for my flutter project, but it tells me:
"Because every version of flutterfire_cli depends on xml >=5.3.0 which
requires SDK version >=2.14.0 <3.0.0, flutterfire_cli is forbidden"
Showing that my SDK version is 2.13.4 and it needs 2.14.0 onwards.
I went to flutter console as administrator and run choco upgrade dart-sdk. It told me I now have version v2.17.3.
However, I still get the same problem in flutterfire_cli.
Things I've tried:
creating a .bashrc file with the line export PATH="$PATH": "C:\Users\sjrol\OneDrive\Documentos\flutter\.pub-cache\bin" in it (it is the route flutter console told me to save).
creating a system environment variable inside PATH that points to my dart folder , with the newer version.
In my pubspec.yaml file I've got .
Then rebooted the PC. Same problem. No idea of what's happening.
Dart pub global and choco upgrade results (running the firebase console as administrator):
Flutter doctor (I don't use android studio so no problem, and the android status problem is something I've been facing for a long time and has never given me any problem. Maybe it still has something to do with this?).
I can tell I'm working with the new dart version in my VSCode now, thanks to the new features it has, but firebase still won't let me install CLI. Thank you in advance for your help.
Try this:
Change your sdk version in pubspec.yaml to sdk: ">=2.17.3 <3.0.0"
Run dart --version to make sure the new path is working
Run flutter clean
Run the app

How to install all identical versions of its Windows working environment on Mac? (React-Native)

I have my React-native application on my Windows pc.
I would like to install exactly the same working environment on my Mac
with identical versions of each element to build my app on Mac without a hitch.
I don't know at all how to do it or where to start.
What is the easiest way to do this by considering having the same versions?
I am novice, any help would be highly appreciated.
Assuming you have an npm-shrinkwrap.json file in your project the versions should stay the same when you transfer to a different machine. If you don't, you can create one using npm shrinkwrap
There's lots of little things that could cause problems, but generally if you do the following steps it should get you most of the way there:
1) install react native on the mac npm install -g react-native-cli
2) copy your project code to the mac
3) run npm install from the root directory of the react native project
4) run react-native link
5) cd ios and run pod install
6) Double-click the *.xcworkspace file to open up the project in Xcode.
7) cd .. to return to the project directory
8) run npm start -- --reset-cache to launch the bundler
7) try to build in Xcode
Using Git and Github (or equivalent) seems to be a long term solution
Create a repo, commi, push your project and clone it and the Mac.
Every time you do a modification on your PC, you commit, push and then pull it on your Mac.
All the versions are specified in package.json, so after an npm install your project should be exactly the same.

Upgrading nativescript to 4.1.0

At the time of writing, nativescript version on npm is 4.0.2, but on github, there is a tag for 4.1.0. I would like to install 4.1.0, since some bugs have been fixed there.
tns update 4.1.0 returns Could not update the project! error and npm install -g nativescript#4.1.0 returns No matching version found error.
How can I upgrade?
Update to latest version using
npm install -g nativescript
Can also follow the Instructions
https://www.npmjs.com/package/nativescript
UPDATE
You cannot update to 4.1.0 since there is no version on it.
You can however use the following to upgrade / update to the RC
npm install -g nativescript#4.1.0-2018-05-25-11664
Screenshot for above
If that fails
Try updating npm then do the above
This might be caused by npm-audit-report
Reference
Warning: This can be very much bleeding edge. But let me help you navigate it...
NativeScript has several packages that are intertwined.
The CLI (npm i -g nativescript)
The Core Modules (npm i tns-core-modules --save)
The runtimes android or ios (tns platform add ios)
The newer runtimes may depend on features in the core modules; so you might have to make sure you have an updated core modules if you update your runtimes. This isn't always needed; I frequently test out only one of the three things at a time; but occasionally you need to update everything to make it work.
The simple instructions:
npm i -g nativescript#rc
npm i tns-core-modules#rc --save
tns platform remove android
tns platform add android#rc
tns platform remove ios
tns platform add ios#rc
The informative instructions:
The CLI can be very dependent on which version of the runtimes you plan on using. For example the current 4.x cli can't work with the older 2.x projects anymore. However, it does continue to work with recent 3.x projects. And vise-versa; The 2.x CLI won't build 4.x projects correctly. So you are much safer using the same major version of the CLI as the runtimes you plan on using. (Normally you use the latest release runtimes; but if you have existing projects that haven't been upgraded you might still have 2.x projects)
NativeScript has three version tags depending on what you want.
The standard #LATEST, public version (i.e. npm i -g nativescript#latest ) will give you the current latest release version. Typically a npm i -g nativescript is equivalent to #latest; but in cases of core modules it will use the version in the package.json file. So if you want to install the latest release; it is safer to tack on the #latest to make sure you get the latest release.
The #NEXT version; this is actually a LIE. NEXT = Master; this is NOT the NEXT version of NativeScript. This means you will have everything that has been accepted to master including things that might not actually be rolled out for several more versions (or ever). Master can and typically is buggy, some days more than others. Next versions are generated nightly. But it is very useful for testing if a fix works; DO NOT release an app to clients on #next; you will most likely regret it.
The #RC version; this is actually the release candidate. This version shows up typically a week or so before the final release of the next public version. This is normally a fairly safe version to use; these are manually generated releases for them to start doing in-depth testing before the release version. Please note; that once 4.1 is released the RC is going to point to the 4.1 RC; which is older than latest -- not the final release. So you only want to use #RC when it actually points to a newer version than #latest.
Updating NativeScript CLI:
So now to tell what is the current versions you can do:
npm info nativescript and as of today you would see:
'dist-tags':
{ latest: '4.0.2',
next: '4.2.0-2018-05-30-11723',
rc: '4.1.0-2018-05-30-11720' },
Notice that #latest = 4.02, #next = 4.2.x-DATE and #rc = 4.1.x-DATE.
In this case; doing npm i -g nativescript#next will give you the current Master 4.2.x However, since you are wanting 4.1 and preferably a stable version; since RC has been updated to 4.1 already; then your best bet is to do:
npm i -g nativescript#rc --save and you will get 4.1.0 of the CLI.
Now to update your project;
Updating Core Modules:
You would want to do npm info tns-core-modules again to see the tags for the core modules and you would see something like
'dist-tags':
{ latest: '4.0.1',
next: '4.2.0-2018-05-30-01',
rc: '4.1.0-2018-05-30-06' },
So just like the CLI you would use npm i tns-core-modules#rc; please note no -g as this is a package that is installed as part of your app.
Updating the Android Runtimes
Do npm info tns-android
'dist-tags':
{ latest: '4.0.1',
next: '4.2.0-2018-05-30-01',
rc: '4.1.1-rc-2018-05-28-03' },
For the platforms you need to remove the older version; then install the newer version.
tns platform remove android and then tns platform add android#rc
Updating the iOS Runtimes
Do npm info tns-ios
'dist-tags':
{ latest: '4.0.1',
next: '4.1.0-2018-05-25-01',
rc: '4.1.0-rc-2018-05-26-01' },
And then type
tns platform remove ios and then tns platform add ios#rc
Final notes:
Very frequently you can get away with upgrading just the runtimes or core modules without updating anything else. However, if you have issues building or the app crashes on startup; then you probably need to update everything to be in sync.
You can do npm i -g nativescript#4.1.0-2018-05-30-11720 to install a specific version of it. However, in the many years I've done this I can't think of a reason I have had to do anything beyond the tags of #latest, #next or #rc.
Remember there are THREE separate pieces that you need to be aware of; the CLI (which builds the app; but really has no effect on bugs in the app). The Runtimes (i.e. the JavaScript engine that runs your code), and the Core modules (i.e. the code that makes <Label> become the proper text display on each platform. Depending on which layer your issue is in; that is the piece you want to upgrade.
If you are using NativeScript-Angular, NativeScript-Vue, or the NativeScript-Webpack; there are additional pieces you may have to install to make them compatible with a #rc or #next version.

Nativescript 1.3.0 intsllation issue

I will try my best to explain what I did and where I am right now. I am using window7
What I did for installation.
Installed jdk and updated the environment path variable and created new one JAVA_HOME
Downloaded Gradle and updated the environment path pointing to bin directory of gradle
Installed android sdk with all the specified version, sdk tool, and platform tools.
Created ANDROID_HOME variable.
Remove and Reinstalled Nativescript
Ran tns doctor command and result can be found here
Launched the app via tns run android --emulator and tried on device as well error received was "Unfortunately mysir has stopped" and log can be found here.
Now Can anyone please tell me what I am missing?
Check out if <your app>\platforms\android\src\main\assets\internal\prepareExtend.js file exists. This file is supposed to be created when you execute tns platform add android command. If the file does not exist then it may be better to create a new project.
well the whole problem was I was not running command npm install tns-core-modules --save after creating new project.

Meteor CordovaLib version

I need to use latest Cordova lib to build project. However, if I start build it for device, in Xcode under my project root I see CortovaLib.xcodeproj with VERSION 3.5.0 (latest on this time is 3.8.0, and what I really need is at least 3.7.0). What I tried is npm install -g cordova and meteor remove/add platform.
Have I possibility to choose cordova lib if I use meteor toolkit, or should I wait for meteor updates?
In the next release of meteor they are upgrading the Cordova CLI dependency from 3.5.1 to 4.2.0. You can read more about the specifics v.Next. As far as I know there is not an official release date set.

Resources