I was able to get it working! It looks like despite the fact that I tried updating / removing and reinstalling the cordova plugin it was not pulling the latest version in (2.0.1). Once I was able to actually get it installed the error seemed to be resolved.
A quick side note. The current version of the cordova-plugin-screen-orientation plugin is broken due to the fact that its relying on a dependency that cannot be accessed ( for whatever reason ). There is a pull-request for a fix out though currently but it has not yet been merged into master. The way I was able to get this working is I just installed the plugin directly from the fixed fork branch instead of the main.
TLDR: If you are having problems with the cordova-plugin-screen-orientation plugin try below
ionic cordova plugin remove cordova-plugin-screen-orientation.
ionic cordova plugin add cordova-plugin-screen-orientation@latest
- If the above fails with this error
Error: Failed to fetch plugin https://github.com/vstirbu/PromisesPlugin.git via registry.
Contine below, otherwise you should be good ionic cordova plugin remove cordova-plugin-screen-orientation.
cordova plugin add https://github.com/Exilz/cordova-plugin-screen-orientation.git --save
- Now you should be good
Hopefully this helps someone!
P.S. Ensure after the above steps that you have installed the latest ionic/native screen-orientation plugin using..
npm rm @ionic-native/screen-orientation
npm install --save @ionic-native/screen-orientation@latest