-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running ng serve shows the following error: #526
Comments
Which version of angular and ngx-scanner? |
Angular CLI: 15.2.8 Angular: 15.2.9 ngx-scanner |
For angular 15 you need to use version 3.9.0 (define the version without ^ character in front!!) |
Ooh! I have installed the dependency |
The installation is done correctly, following the steps proposed in the documentation.
When running ng serve
shows the following error:
Error: node_modules/@zxing/ngx-scanner/lib/zxing-scanner.component.d.ts:305:91 - error TS2344: Type '{ autofocusEnabled: { alias: "autofocusEnabled"; required: false; }; timeBetweenScans: { alias: "timeBetweenScans"; required: false; }; delayBetweenScanSuccess: { alias: "delayBetweenScanSuccess"; required: false; }; ... 7 more ...; tryHarder: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"autofocusEnabled"' is incompatible with index signature.
Type '{ alias: "autofocusEnabled"; required: false; }' is not assignable to type 'string'.
305 static ɵcmp: i0.ɵɵComponentDeclaration<ZXingScannerComponent, "zxing-scanner", never, { "autofocusEnabled": { "alias": "autofocusEnabled"; "required": false; }; "timeBetweenScans": { "alias": "timeBetweenScans"; "required": false; }; "delayBetweenScanSuccess": { "alias": "delayBetweenScanSuccess"; "required": false; }; "autostart": { "alias": "autostart"; "required": false; }; "previewFitMode": { "alias": "previewFitMode"; "required": false; }; "device": { "alias": "device"; "required": false; }; "formats": { "alias": "formats"; "required": false; }; "videoConstraints": { "alias": "videoConstraints"; "required": false; }; "torch": { "alias": "torch"; "required": false; }; "enable": { "alias": "enable"; "required": false; }; "tryHarder": { "alias": "tryHarder"; "required": false; }; }, { "autostarted": "autostarted"; "autostarting": "autostarting"; "torchCompatible": "torchCompatible"; "scanSuccess": "scanSuccess"; "scanFailure": "scanFailure"; "scanError": "scanError"; "scanComplete": "scanComplete"; "camerasFound": "camerasFound"; "camerasNotFound": "camerasNotFound"; "permissionResponse": "permissionResponse"; "hasDevices": "hasDevices"; "deviceChange": "deviceChange"; }, never, never, false, never>;
Error: node_modules/@zxing/ngx-scanner/lib/zxing-scanner.component.d.ts:305:91 - error
static ɵcmp: i0.ɵɵComponentDeclaration<ZXingScannerComponent, "zxing-scanner", never, { "autofocusEnabled": { "alias": "autofocusEnabled"; "required": false; }; "timeBetweenScans": { "alias": "timeBetweenScans"; "required": false; }; "delayBetweenScanSuccess": { "alias": "delayBetweenScanSuccess"; "required": false; }; "autostart": { "alias": "autostart"; "required": false; }; "previewFitMode": { "alias": "previewFitMode"; "required": false; }; "device": { "alias": "device"; "required": false; }; "formats": { "alias": "formats"; "required": false; }; "videoConstraints": { "alias": "videoConstraints"; "required": false; }; "torch": { "alias": "torch"; "required": false; }; "enable": { "alias": "enable"; "required": false; }; "tryHarder": { "alias": "tryHarder"; "required": false; }; }, { "autostarted": "autostarted"; "autostarting": "autostarting"; "torchCompatible": "torchCompatible"; "scanSuccess": "scanSuccess"; "scanFailure": "scanFailure"; "scanError": "scanError"; "scanComplete": "scanComplete"; "camerasFound": "camerasFound"; "camerasNotFound": "camerasNotFound"; "permissionResponse": "permissionResponse"; "hasDevices": "hasDevices"; "deviceChange": "deviceChange"; }, never, never, false, never>;
}
If you can help me with this problem since I can't find solutions.
The text was updated successfully, but these errors were encountered: