Ngx-scanner: VideoInputDevice.d.ts: error : Initializers are not allowed in ambient contexts.

Created on 10 Jul 2019  路  4Comments  路  Source: zxing-js/ngx-scanner

scanner work fine but it throw an error that from it i cannot build my application

i use angular 6

ERROR in node_modules/@zxing/library/esm5/browser/VideoInputDevice.d.ts(10,21): error TS1039: Initializers are not allowed in ambient contexts.

Capture
.

question

All 4 comments

I have the same error and i'm using angular 6 too with typescript 2.9.2
I read here https://github.com/valor-software/ngx-bootstrap/issues/5220 that a solution is to upgrade to a more recent version (something that I can't do for now.. ).

What's the version of the scanner you're using?

I have also experienced the same problem.
image
image

I think it might be related to the versions I am using. I hope this one gets solved.

Try using a less recent version of the scanner. The latest version was not tested with Angular 6, but only v7 and v8.

Was this page helpful?
0 / 5 - 0 ratings