Error: Uncaught (in promise): TypeError: Object(...) is not a function when implementing network


Hi i am new to Ionic.when i am implementing network functionality to know the status of network i am facing the following error.

Error: Uncaught (in promise): TypeError: Object(…) is not a function
TypeError: Object(…) is not a function
at Network.onDisconnect (vendor.js:75352)
at new HomePage (main.js:563)
at createClass (vendor.js:13176)
at createDirectiveInstance (vendor.js:13011)
at createViewNodes (vendor.js:14469)
at createRootView (vendor.js:14358)
at callWithDebugContext (vendor.js:15783)
at Object.debugCreateRootView [as createRootView] (vendor.js:15066)
at ComponentFactory_.create (vendor.js:11963)
at ComponentFactoryBoundToModule.create (vendor.js:4715)
at c (polyfills.js:3)
at c (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (vendor.js:5436)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at o (polyfills.js:3)
at e.invokeTask [as invoke] (polyfills.js:3)
at p (polyfills.js:2)

can anyone please help me out.

Thanks in advance


Hi there!
A good deal is to check and install rxjs compatibility. Follows below:

npm i rxjs rxjs-compat --save

But, if it do not solve the problem for you.
You may try to downgrade you Ionic native core version.
So, in your package.json file you may change the version to something like “@ionic-native/core”: “^4.7.0” or use npm install command line.

npm install --save @ionic-native/core@4.7.0

Hope it may helps.
Have a nice time!


Hi, was there any warning while installing plugin or npm install ?