Reputation: 344
I upgrade my ionic CLI version to 4.1.2, and now i am trying to use the Goelocation plugin, but i am getting this error
ERROR in node_modules/@ionic-native/geolocation/index.d.ts(2,10): error TS2305: Module '"C:/projects/ionic/myApp3/node_modules/rxjs/Observable"' h
as no exported member 'Observable'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
[ng] i 「wdm」: Failed to compile.
I will like to know how to will fix this error.
I was thinking of downgrading my ionic CLI version and try downloading a new ionic application, but i find a way to do that.
What will be the code to downgrade my ionic CLI version back to version 3.
Upvotes: 1
Views: 389
Reputation: 2870
You can downgrade your ionic CLI version by running below command:
npm install -g [email protected]
Please find release version list here https://github.com/ionic-team/ionic-cli/releases
Or
Alernatively, you need to delete node_modules folder and modify your package.json file by adding below code:
"dependencies": {
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"ionic-angular": "3.9.2",
"ionic-native": "^2.9.0",
"rxjs": "5.5.11"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.11",
"typescript": "~2.6.2"
}
Then need to run below command:
npm install
Upvotes: 1