Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.
Ionic:
ionic (Ionic CLI) : 4.1.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.3
@angular-devkit/core : 0.7.4
@angular-devkit/schematics : 0.7.4
@angular/cli : 6.1.4
@ionic/ng-toolkit : 1.0.7
@ionic/schematics-angular : 1.0.5
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.0.3, (and 4 other plugins)
System:
ios-deploy : 2.0.0
ios-sim : 7.0.0
NodeJS : v9.2.0 (/usr/local/bin/node)
npm : 6.4.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Describe the Bug
Failed to compile.
./node_modules/@ionic-native/screen-orientation/index.js
Module not found: Error: Can't resolve 'rxjs/Observable' in '/Users/emish/kondo/node_modules/@ionic-native/screen-orientation'
Steps to Reproduce
1- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-screen-orientation
$ npm install --save @ionic-native/screen-orientation
2- add it to the application as in the documentation
I think you have to use "@ionic-native/screen-orientationr": "5.0.0-beta.14", and import import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
@Anthony2539 thanks, i will try that
For Ionic 4 beta native plugin installation the import path must end with /ngx.
Follow the guide https://beta.ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module
To use a plugin, import and add the plugin injectable to a @NgModule. For Angular, the import path should end with /ngx.
Thanks for the issue. I am going to close this since it looks like the above comments should fix it. If you're still seeing an error let me know.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
I think you have to use
"@ionic-native/screen-orientationr": "5.0.0-beta.14",and importimport { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';