nativescript-printer
nativescript-printer copied to clipboard
Build Error with NS 8.4.0
Hi I have noticed that the plugin throughs error on the build after updating to NS 8.4.0.
ERROR in ./node_modules/nativescript-printer/printer.android.js 2:0-56
Module not found: Error: Can't resolve '@nativescript/core/utils/utils' in '/Users/app/node_modules/nativescript-printer'
I think the problem from duplicated word "utils" in the path. Thanks
i changed the import as follows
// import * as utils from "@nativescript/core/utils/utils"; import { Utils as utils } from "@nativescript/core"
also using the constructor as follows
constructor() { // this.printManager = utils.ad.getApplicationContext().getSystemService(android.content.Context.PRINT_SERVICE); this.printManager = utils.android.getApplicationContext().getSystemService(android.content.Context.PRINT_SERVICE); }