ngx-scanner
                                
                                 ngx-scanner copied to clipboard
                                
                                    ngx-scanner copied to clipboard
                            
                            
                            
                        Errors on npm run build
Describe the bug
I have 2.0.1 version of @zxing/ngx-scanner, when I do the npm start my application is working but I can see that there are the following errors:
ERROR in [at-loader] ./node_modules/@zxing/library/esm5/core/oned/OneDReader.d.ts:13:25 TS1005: ';' expected.
ERROR in [at-loader] ./node_modules/@zxing/library/esm5/core/oned/UPCEANReader.d.ts:13:25 TS1005: ';' expected.
ERROR in [at-loader] ./node_modules/@zxing/library/esm5/core/oned/rss/AbstractRSSReader.d.ts:2:25 TS1005: ';' expected.
ERROR in [at-loader] ./node_modules/@zxing/library/esm5/browser/VideoInputDevice.d.ts:10:21 TS1039: Initializers are not allowed in ambient contexts.
ERROR in [at-loader] ./node_modules/@zxing/library/esm5/core/oned/OneDReader.d.ts:13:16 TS2304: Cannot find name 'abstract'.
ERROR in [at-loader] ./node_modules/@zxing/library/esm5/core/oned/UPCEANReader.d.ts:13:16 TS2304: Cannot find name 'abstract'.
ERROR in [at-loader] ./node_modules/@zxing/library/esm5/core/oned/rss/AbstractRSSReader.d.ts:2:16 TS2304: Cannot find name 'abstract'.
ERROR in [at-loader] ./node_modules/@zxing/ngx-scanner/lib/zxing-scanner.component.d.ts:40:21 TS2315: Type 'ElementRef' is not generic.
These errors are shown when I do the npm run build and npm run build fails.
Does anyone have any idea what to do?
PS I have: ng-version="4.4.6" "@zxing/ngx-scanner": "^2.0.1" "typescript": "~2.2.2"
Your TypeScript version may be a problem. You should check if you are not compiling TS files as well, because you shouldn't.
In my tsconfig.json I've already excluded node_modules and compileOnSave is false (Is this what you meant?). Do you think that I need to change the version of my ts?
Hi guys, I have this problem when I run ng serve command package i have: "typescript": "^3.3.3" "@zxing/ngx-scanner": "^3.0.1", Angular 4.4.7
Do you think that I need to change the version of my ts?
Yes, it seems like a compatibility problem because your builder/compiler cannot understand the type declarations generated by @zxing-js/library package.