I am trying to use the native Ionic plugin Vibration, but I get this error when executing the app:
Error: No provider for Vibration!
at NoProviderError.BaseError [as constructor] (main.js:8200)
at NoProviderError.AbstractProviderError [as constructor] (main.js:56183)
at new NoProviderError (main.js:56214)
at ReflectiveInjector_._throwOrNull (main.js:107800)
at ReflectiveInjector_._getByKeyDefault (main.js:107828)
at ReflectiveInjector_._getByKey (main.js:107791)
at ReflectiveInjector_.get (main.js:107600)
at AppModuleInjector.NgModuleInjector.get (main.js:56885)
at CompiledTemplate.proxyViewClass.AppView.injectorGet (main.js:108342)
at CompiledTemplate.proxyViewClass.DebugAppView.injectorGet (main.js:108584)
ErrorHandler.handleError @ main.js:56472
Note: when I run npm install --save @ionic-native/vibration
, I get the following:
Any idea of how to fix this?
By the way, I don’t understand how a dependency can be both extraneous and causing an error because unmet.