Ionic native printer error check is not a function

Followed the steps to be able to print on ionic following the steps of the documentation of ionic native printer but at the time of passing it an android or an ios I throw this error:

TypeError: n.getPlugin().check is not a function. (In ‘n.getPlugin().check(function(e,n){t({avail:e,count:n})})’, ‘n.getPlugin().check’ is undefined).

It should be noted that the provider is already in the app.module.

this.printer.isAvailable().then((onsuccess: any) => {
let options: PrintOptions = {
name: ‘MyDocument’,
printerId: ‘printer007’,
duplex: true,
landscape: true,
grayscale: true
this.printer.print(’’,options).then((value: any) => {
console.log(‘value:’, value);
}, (error) => {
console.log(‘error:’, error);

      }, (err) => {
          console.log('err:', err)

I’m new to ionic and I would really appreciate it if you could help me find a way to find the solution

Thank you for your attention.

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.15.2
ionic (Ionic CLI) : 3.15.2

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : android 6.3.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2


Node  : v6.9.4
npm   : 3.10.10
OS    : macOS Sierra
Xcode : Xcode 9.1 Build version 9B55

Environment Variables:

ANDROID_HOME : not set


backend : pro