create project in ionic with --v2 and framework are 3 - ionic-framework

I created a project with
ionic start navigationAppv2 blank --v2
but when I use ionic info say:
Ionic Framework Version: 3.0.0
how can I solve this?

Not sure what you mean but I suspect you want to downgrade your Ionic framework version? If so, you just need to update your package.json to "ionic-angular": "2.3.0" for instance. The below is an extract of my package.json file running on the latest v2 version:
"#angular/common": "2.4.8",
"#angular/compiler": "2.4.8",
"#angular/compiler-cli": "2.4.8",
"#angular/core": "2.4.8",
"#angular/forms": "2.4.8",
"#angular/http": "2.4.8",
"#angular/platform-browser": "2.4.8",
"#angular/platform-browser-dynamic": "2.4.8",
"#angular/platform-server": "2.4.8",
"#ionic-native/core": "3.4.4",
"#ionic-native/device": "3.4.4",
"#ionic-native/in-app-browser": "3.4.4",
"#ionic-native/local-notifications": "3.4.4",
"#ionic-native/splash-screen": "3.4.4",
"#ionic-native/status-bar": "3.4.4",
"#ionic/storage": "2.0.0",
"ionic-angular": "2.3.0"

Related

ionic 5 production build failing

I just upgraded to ionic 5 -- and my prod build fails with the following:
ERROR in ./node_modules/#ionic/angular/fesm2015/ionic-angular.js
Module build failed (from ./node_modules/#angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'kind' of undefined
Debug build works well.
To fix this,
Make sure your dependencies are
dependencies:
"#angular/common": "8.2.13",
"#angular/core": "8.2.13",
"#angular/forms": "8.2.13",
"#angular/platform-browser": "8.2.13",
"#angular/platform-browser-dynamic": "8.2.13",
"#angular/pwa": "^0.803.23",
"#angular/router": "8.2.13",
"#angular/service-worker": "^8.2.14",
dev dependencies:
"#angular-devkit/architect": "^0.803.23",
"#angular-devkit/build-angular": "^0.803.23",
"#angular-devkit/core": "^8.3.23",
"#angular-devkit/schematics": "^8.3.23",
"#angular/cli": "^8.3.23",
"#angular/compiler": "8.2.13",
"#angular/compiler-cli": "8.2.13",
"#angular/language-service": "^8.2.14",
"#ionic/angular-toolkit": "^2.1.2",
specifically note, 8.2.13 for angular instead of 8.1 that I had.
Also take a look at:
https://github.com/ionic-team/ionic/issues/20341

RxJS module give error after update. how to solve?

In my angular 5 project. My imports have been producing weird errors that I cant remember having a few days ago. For the import here below it says: "module ...rxjs/observable has no exported member observable".
import { Observable } from 'rxjs/Observable';
I did not have this before.
Funny thing is however, the angular website, including the functionality with the observable, works just fine
Here is my package.json:
"private": true,
"dependencies": {
"#angular-devkit/core": "0.0.29",
"#angular/animations": "^5.2.0",
"#angular/cdk": "^5.2.5",
"#angular/common": "^5.2.0",
"#angular/compiler": "^5.2.0",
"#angular/core": "^5.2.0",
"#angular/forms": "^5.2.0",
"#angular/material": "^5.2.0",
"#angular/material-moment-adapter": "^5.2.5",
"#angular/platform-browser": "^5.2.0",
"#angular/platform-browser-dynamic": "^5.2.0",
"#angular/router": "^5.2.0",
"bootstrap": "^4.0.0",
"core-js": "^2.4.1",
"jsonwebtoken": "^8.2.0",
"moment": "^2.20.1",
"moment-duration-format": "^2.2.2",
"npm": "^5.6.0",
"rxjs": "^5.5.12",
"zone.js": "^0.8.19"
},
Unfortunately, I do not know how to solve the import problem. However, I think it might be worth mentioning that I experienced a similar issue when updating to the latest version for Angular 6, that is to say rxjs 6.3.0. So I downgraded to 6.2.1, which made the import errors go away.

Errors when upgrading to Ionic 3

package.json
"dependencies": {
"#angular/common": "4.0.0",
"#angular/compiler": "4.0.0",
"#angular/compiler-cli": "4.0.0",
"#angular/core": "4.0.0",
"#angular/forms": "4.0.0",
"#angular/http": "4.0.0",
"#angular/platform-browser": "4.0.0",
"#angular/platform-browser-dynamic": "4.0.0",
"#ionic-native/core": "^3.4.2",
"#ionic-native/splash-screen": "3.4.2",
"#ionic-native/status-bar": "3.4.2",
"#ionic/storage": "2.0.1",
"ionic-angular": "3.0.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#ionic/app-scripts": "1.3.0",
"typescript": "~2.2.1"
},
When I wanna change my version of Ionic from Ionic2 to Ionic3, I encountered some errors Is it my version of #angular/core outdated or? [Sorry I could not copy and paste the errors here, only can snip a photo of it.]

How to stop ionic cordova run android command delete existing ionic apps on the device

I'm new to the forum and need help on running/installing ionic 3 app on a real device.
This command: ionic cordova run android (in my case) will delete the existing ionic app being installed on the device even though the app names are different.
I'd tried using ionic cordova run android --prod --release but the result is the same, i.e. Only ONE ionic app will be installed on the Android device which doesn't sound right.
Is there a way to prevent that from happening? Any options? Below is my package.json file:
"dependencies": {
"#angular/common": "5.0.3",
"#angular/compiler": "5.0.3",
"#angular/compiler-cli": "5.0.3",
"#angular/core": "5.0.3",
"#angular/forms": "5.0.3",
"#angular/http": "5.0.3",
"#angular/platform-browser": "5.0.3",
"#angular/platform-browser-dynamic": "5.0.3",
"#ionic-native/core": "4.4.0",
"#ionic-native/splash-screen": "4.4.0",
"#ionic-native/status-bar": "4.4.0",
"#ionic/pro": "1.0.16",
"#ionic/storage": "2.1.3",
"cordova-android": "6.3.0",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-whitelist": "^1.3.1",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
Have you changed the package name of that App? This issue happened when package name of Apps are same.

Error While Adding New Provider in ionic

When i try to add a new provider to my existing ionic project it throws
The generate command is only available for projects t
hat use ionic-angular >= 3.0.0
I tried the following command to upgrade but it doesn't worked out
>npm install --save ionic-angular
My Ionic Version is 3.2.0
My Package.json looks
"dependencies": {
"#angular/common": "2.4.8",
"#angular/compiler": "2.4.8",
"#angular/compiler-cli": "2.4.8",
"#angular/core": "2.4.8",
"#angular/forms": "2.4.8",
"#angular/http": "2.4.8",
"#angular/platform-browser": "2.4.8",
"#angular/platform-browser-dynamic": "2.4.8",
"#angular/platform-server": "2.4.8",
"#angular/tsc-wrapped": "~0.5.2",
"#ionic/storage": "2.0.0",
"ionic-angular": "^2.3.0",
"ionic-native": "2.4.1",
"ionicons": "3.0.0",
"lodash-es": "^4.17.4",
"node-uuid": "^1.4.7",
"rxjs": "5.0.1",
"sw-toolbox": "3.4.0",
"uuid": "^2.0.2",
"zone.js": "0.7.2"
}