I just updated the ionic-native core package, did npm cache clean
, and re-installed all node modules and plugins.
Now the printer is able to run and this.printer.isAvailable()
works. But when I do
this.printer.pick().then(result => {
console.log(result);
});
I get the following error:
My package.json is the following:
{
"name": "dianoia",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.1.0",
"@angular/compiler": "4.1.0",
"@angular/compiler-cli": "4.1.0",
"@angular/core": "4.1.0",
"@angular/forms": "4.1.0",
"@angular/http": "4.1.0",
"@angular/platform-browser": "4.1.0",
"@angular/platform-browser-dynamic": "4.1.0",
"@ionic-native/core": "^3.10.3",
"@ionic-native/in-app-browser": "^3.10.3",
"@ionic-native/native-storage": "^3.10.3",
"@ionic-native/printer": "^3.10.3",
"@ionic-native/splash-screen": "3.7.0",
"@ionic-native/status-bar": "3.7.0",
"@ionic/storage": "2.0.1",
"cordova-android": "^6.2.3",
"cordova-browser": "^4.1.0",
"cordova-plugin-console": "^1.0.7",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-inappbrowser": "^1.7.1",
"cordova-plugin-nativestorage": "^2.2.2",
"cordova-plugin-printer": "git+https://github.com/katzer/cordova-plugin-printer.git",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.3",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-sqlite-storage": "^2.0.4",
"ionic-angular": "3.2.1",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.10"
},
"devDependencies": {
"@ionic/app-scripts": "1.3.7",
"@ionic/cli-plugin-cordova": "1.2.1",
"@ionic/cli-plugin-ionic-angular": "1.2.0",
"@ionic/cli-plugin-ionic1": "1.2.0",
"typescript": "2.2.1"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-nativestorage": {},
"cordova-sqlite-storage": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-printer": {}
},
"platforms": [
"android",
"browser"
]
}
}