Updating ionic with command? - ionic-framework

I just installed ionic CLI#5.4.4. It is latest version.
But When I started new project it installed "#ionic/angular": "^4.7.1", "#angular/core": "~8.1.2" and so on. So not latest versions :/
How should I update those?
ng update #ionic/angular #angular/core #angular/cli ?
Or maybe simply update package.json file?

You can also just modify your package.json and run npm install.

Related

Ionic cli 4 but ionic project is on 5

So I'm trying to create a new ionic 4 project, I installed the cli version 4
Cli version:
ionic -v command shows this line
CLI 4.12.0
but once I created the project and checked package.json of the project I found this line :
"#ionic/angular": "^5.0.0",
this is a little bit confusing, but this means that my project runs under ionic 5 ?
Thank you.
The cli has nothing to do with the #ionic/angular version. You can use the latest cli version, but install the #ionic/angular version you'd like, doing this:
npm i #ionic/angular#YOUR.VERSION.NUMBER
You can pick whatever version you'd like from here. Just go to Versions tab.
edit: you may want to do this before downgrading if you don't start a fresh install:
npm rm #ionic/angular --save

How to install Ionic framework V5

I installed Ionic framework with npm.
npm install -g #ionic/cli
The installed version is 6.2.1, but in my work they using the version 5. How i can install the version 5 ?
6.2.1 is the version of the installed Ionic CLI. This is NOT the Ionic Framework version.
To check the Ionic Framework version of a project, open package.json and look for the version of #ionic/angular. It should be something like this: "#ionic/angular": "^5.0.5".
Also, the versions of the #ionic-native/* plugins would be 5 or greater.
To sum it up, if you are about to contribute to an Ionic 5 project, installing the latest version of the Ionic CLI is enough. When setting up the project on your machine, running npm install should install all the required dependencies, including Ionic 5.

How to migrate Ionic 4.2.0 to latest version?

My Ionic information is -
I want to upgrade it to latest veriosn i.e 4.7.0, How to do this?
You should take a look at the release notes to see how to install this (and every) version of Ionic 4.
With this version comes support for Angular 8! Follow the below steps
to update.
1) Update #ionic/angular and #ionic/angular-toolkit to the latest
releases:
npm install #ionic/angular#4.7.0
npm install #ionic/angular-toolkit#2.0.0 -D
2) Update #angular/core and #angular/cli:
npx ng update #angular/core #angular/cli
3) Update #angular-devkit dependencies:
npm i #angular-devkit/architect#latest #angular-devkit/build-angular#latest #angular-devkit/core#latest #angular-devkit/schematics#latest
View our Angular 8 Update Guide for tips on potential issues!
Once that's ready, you can finally update the Ionic version:
npm install #ionic/angular#4.7.0 --save-exact
using specific version can achive
globally
npm install -g ionic#4.7.0
locally
npm install ionic#4.7.0

Ionic 2: How to update Ionic library for an existing project?

Can't find any info on Ionic 2 website. For example, a project is created with Ionic library 2.0.1. How do I update it to Ionic library 2.1.0? What is the standard procedure? ionic lib update is deprecated.
If you want to update your CLI, you need to run:
npm install -g ionic#latest
For updating your project, open your package.json and update the version of ionic-angular entry and any other dependencies that need to be updated. Reference to a package.json is here which is the one that is downloaded when you start a new project.
Then delete your projects node_modules and run:
npm install in your project directory.
You can also go to your project directory and type:
npm install ionic-angular#latest --save
npm install #ionic/app-scripts#latest --save-dev
In my case, npm install -g ionic#latest installed globally the latest ionic but it didn't update the ionic version of my project. Only the above solution worked.
PS 1: I'm using ionic 3
PS 2: Delete the project's folder node_modules, in case of errors

Update IONIC not working (windows)

I want to update ionic-cli to 1.7.1 i run this command
npm uninstall -g ionic
npm install -g ionic
and this
npm update -g ionic
but it won't update , when i run
ionic
it shows the version 1.6.5
what's wrong ? and how to fix it ?
i'm on Windows 10
inject this line of code in your bower.json file and run bower update
"ionic": "driftyco/ionic-bower#1.1.0",