Cannot add to add InAppBrowser to providers

[ts]
Type ‘InAppBrowserOriginal’ is not assignable to type ‘Provider’.
Type ‘InAppBrowserOriginal’ is missing the following properties from type ‘FactoryProvider’: provide, useFactory [2322]

I guess the new version of in-app-browser had something changed.
I solved this problem by uninstalling the latest version and installed the older version.

npm uninstall --save @ionic-native/in-app-browser
npm install --save @ionic-native/in-app-browser@^4.17.0

I hope this solution help you.

2 Likes

I had the same problem and it worked.
Thank you

I found that if I change the import statement to:
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
It works without issue. Sorry for the trouble!

3 Likes

That’s a smarter way for this bug!
Thanks for sharing it :slight_smile:

It’s working. Thanks :slight_smile:

change the import statement to:
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
It works without issue.

1 Like