ng-thermal-print icon indicating copy to clipboard operation
ng-thermal-print copied to clipboard

- error TS2304: Cannot find name 'USBDevice'.

Open rius1212 opened this issue 3 years ago • 3 comments

hi bebo925 , i got error when try to start project using ng serve. i already try to use this command npm install @types/w3c-web-usb --only=dev but i still got error like what i put in the title issue. any idea what i need to do ?

ERROR in node_modules/ng-thermal-print/lib/drivers/UsbDriver.d.ts:16:30 - error TS2304: Cannot find name 'USBDevice'.

16 requestUsb(): Observable<USBDevice>; ~~~~~~~~~ node_modules/ng-thermal-print/lib/drivers/UsbDriver.d.ts:1:23 - error TS2688: Cannot find type definition file for 'w3c-web-usb'.

1 ///

rius1212 avatar Mar 09 '21 04:03 rius1212

having the same issue here

jooskesters avatar Apr 08 '21 20:04 jooskesters

I have the same error, have you been able to solve it?

cooper1388 avatar Jun 11 '21 17:06 cooper1388

No... I suggest you step away from these libraries and use java.. With java you can copy some printing code from stackoverflow and it will work most of the time. You can then create a background service from your java program that handles the printing jobs ..

This is how I fixed it. Works fine, just some more work then expected when I put my faith in these stupid npm libraries

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Joseph Cooper @.> Sent: Friday, June 11, 2021 7:35:01 PM To: bebo925/ng-thermal-print @.> Cc: jkjoos @.>; Comment @.> Subject: Re: [bebo925/ng-thermal-print] - error TS2304: Cannot find name 'USBDevice'. (#37)

I have the same error, have you been able to solve it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/bebo925/ng-thermal-print/issues/37#issuecomment-859735886, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKOJMW6ABAHHKIQX2IRPUBDTSJCMLANCNFSM4Y2YFFUQ.

jooskesters avatar Jun 12 '21 14:06 jooskesters