How to update ionic app?

How to update ionic app?

How to update ionic app

Give Powershell 7 admin rights to execute everything.

Set-ExecutionPolicy RemoteSigned

We have used auglar update guide https://update.angular.io/

update angular packages

npm install @ionic/angular@latest @ionic/angular-toolkit@latest --save

Uninstall Ionic 3 and install Ionic 4 using the new package name

npm uninstall ionic-angular
npm install @ionic/angular@latest

Install Ionic Globally

npm install @ionic/cli@latest

Refresh NPM cache

npm cache verify

Update NPM to latest and install it globally

npm install npm@latest

Update gradle

gradle wrapper --gradle-version 6.5.1

Angular Updatation Guide https://angular.io/cli/update

Update Angular

ng update @angular/cli @angular/core

Update All Angular Dependencies

ng update --all

Update with Force (NOT RECOMMENDED) !!!

ng update --all --force

Update Cordova

npm install cordova@latest

Delete node_module folder and install App dependencies again for testing.

npm install

How to fix ‘Failed to compile in ./src/global.scss’

npm install --save-dev node-sass

or

npm rebuild node-sass --force

You can also update all your npm packages to the latest version

npm update

Remove Android as platform

ionic cordova platform remove android

Add Android as platform

ionic cordova platform add android

Prepare ionic app

ionic cordova prepare android

You can now build the ionic app by this command

ionic cordova build android

Share this post