nativescript-printer icon indicating copy to clipboard operation
nativescript-printer copied to clipboard

Build Error with NS 8.4.0

Open OPADA-Eng opened this issue 3 years ago • 1 comments

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

OPADA-Eng avatar Dec 01 '22 13:12 OPADA-Eng

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); }

image

subhojit-me avatar Jan 03 '24 15:01 subhojit-me