I'm feeling a bit puzzled about NPM package versions.
In my ionic2 app's packages.json file, I have a dependency on [email protected]. Additionally, I have the latest version of ionic-native which is dependent on [email protected].
The issue arises when I created an extension to Observable to add a new method. It works fine in my services, but doesn't work when using services from ionic-native.
This code will work (Get commands simply return Observable)
updateService.getCommands().ExtensionHere();
However, this won't work (onChange will return Observable)
BatteryStatus.onChange().ExtensionHere();
It may seem like a simple question, but I'm a bit stuck because I assumed NPM would use the latest version for all dependencies.
So my question is why it behaves this way? And is there any way to ensure that the same package version is used?