Ionic 3: Cannot find module "@ionic-native/diagnostic"


I’m trying to use the Diagnostic from ionic-native but I’m getting the following error:

–> Cannot find module “@ionic-native/diagnostic”

I installed it using the following command: ionic cordova:plugin add cordova.plugins.diagnostic

In my component i’m importing it using:
import { Diagnostic } from ‘@ionic-native/diagnostic’; (tried also with just ‘ionic-native’ as in the docs with the same result)

Can anyone help me? Thank you.

I also don’t get why the class is found at the import, but when i try to make it a param of the constructor, I get the following message:


From what you wrote you are missing several steps of the installation:

1 Like

I had followed both already. But i forgot to put it in the providers :blush: thank you mate.

1 Like

Change your import

import { Diagnostic } from '@ionic-native/diagnostic';


import { Diagnostic } from '@ionic-native/diagnostic/ngx';