简体   繁体   中英

Ionic App v1 - updating Ionic Framework Version (not Ionic CLI)

I'm trying to understand how to update my Ionic Framework Version.

ionic info

Your system information:

Cordova CLI: 8.0.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.1.0
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
OS:
Node Version: v6.9.1

So the current Ionic Framework Version is "1.1.0"

I updated my bower.json:

{
  "name": "hello-ionic",
  "private": "true",
  "devDependencies": {
    "ionic": "driftyco/ionic-bower#1.3.3"
  }
}

and run bower install

but the new files are being stored at 'bower_components' folder

My folder structure:

在此处输入图像描述

I also copied the files from 'bower_components' to 'lib' folder and still after ionic info the 'Ionic Framework Version' is still '1.1.0'

Try with

npm install -g ionic@1.3.3 

After the CLI has been updated you have a few options when it comes to updating your base library install, goto the root of your project and run this command:

ionic lib update

Here for more details. hope it helps.

Try to upgrade the project to the new versions:

npm install -g ionic@latest
npm install ionic-angular@3.7.0 --save
npm install @ionic/app-scripts@3.0.0 --save-dev
npm install @angular/core@4.4.3 --save
npm install @angular/common@4.4.3 --save
npm install @angular/compiler@4.4.3 --save
npm install @angular/compiler-cli@4.4.3 --save
npm install @angular/forms@4.4.3 --save
npm install @angular/http@4.4.3 --save
npm install @angular/platform-browser@4.4.3 --save
npm install @angular/platform-browser-dynamic@4.4.3 --save
npm install rxjs@5.4.3 --save
npm install zone.js@0.8.17 --save

In addition to improving ionic-angular 3.x .

Also, if you're using animations, run the command:

npm install @angular/animations@4.4.3 --save

It looks like you might actually want

npm update packagename

which does try to honor semver, and does recursively update all the dependencies of packagename. Of course, it does them all recursively asynchronously at once.

If you can give up the need for updating deps-of-deps, then you can get pretty far with

npm --depth 0 update grunt

After a research:

npm will correctly handle version conflicts between shared dependencies by downloading the correct one for each. So, if Dep A depends on Dep C v1.0.0 and Dep B depends on Dep C v2.0.0, they will each be installed and used appropriately. Therefore, you are free to install the latest of any packages you would like.

Then, feel free to update update package by package or use (AFTER UPDATE YOUR ANGULAR PACKAGES) and exclude for a while the ionic packages from the packages.json to don't update them:

npm i -g npm-check-updates
ncu -u
npm install

The ultimate version of IONIC v1 is 1.3.5 , I guess. You'd better make a global install of ionic , first.

sudo npm i -g ionic

Then, install new Ionic v1 CLI Utility locally for CLI commands as it has been released for v1 project maintenance.

npm i @ionic/v1-toolkit

try命令:npm install -g cordova ionic。

simple run

ionic lib update

See official Docs

While the other answers are correct only on updating ionic version with experience I can say you might have old dependencies which might crash with your upgrade so best is to use, https://www.npmjs.com/package/npm-check-updates after installing the package run npx npm-check-updates this will recommend and update all your packages to latest stable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM