question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'zxing-scanner' is not a known element

See original GitHub issue

Describe the bug We started a new Angular project and we import the library using Getting Started wiki page. The scanner works on our PCs (using WebCam) but there is this annoying vs code reported problem.

'zxing-scanner' is not a known element:
1. If 'zxing-scanner' is an Angular component, then verify that it is part of this module.
2. If 'zxing-scanner' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

Expected behavior We expect that there are no errors reported with basic package usage

Screenshots image

Desktop (please complete the following information):

Angular CLI: 11.0.5
Node: 14.15.3
OS: win32 x64

Angular: 11.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.5
@angular-devkit/build-angular   0.1100.5
@angular-devkit/core            11.0.5
@angular-devkit/schematics      11.0.5
@schematics/angular             11.0.5
@schematics/update              0.1100.5
rxjs                            6.6.3
typescript                      4.0.5

Is that an expected behavior? How can we correctly solve it?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
raptortrxcommented, Feb 2, 2021

@odahcam

Hi, updated from 3.0.0 to v3.1.3, the “‘zxing-scanner’ is not a known element:” error is gone. On build i got a dependeny error and had to install @zxing/browser and @zxing/library, then everything worked fine. The bundle size of my angular app increased by ~300kb 😐

0reactions
atorres16commented, Jun 17, 2022

This happened to me because I was using Angular version 12, I updated to Angular 14 and it worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Error NG8001: is not a known element ... - YouTube
https://readdy.net/Notes/Details/1827Angular Error NG8001: 'mat-progress-spinner' is not a known element :Angular Error is an Angular ...
Read more >
Plunk that shows how to use zxing-scanner component with ...
AngularVersionForThisPlunker = 'latest' </script> <title>Zxing-Scanner Demo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
Read more >
Keywords - @zxing/ngx-scanner - npm
High-performance Angular 8 barcode scanner component based on ZXing.. Latest version: 3.6.2, last published: 2 months ago.
Read more >
ngx-zxing-multicode - npm Package Health Analysis - Snyk
A 1D and 2D barcode scanner using HTML5 video element, built using the ZXing library which is really usable For more ... No...
Read more >
Barcode Scanner app on Google Play infects 10 million users ...
Mine isn't from Lavabird, and it's not Zxing either. I forgot which publisher it was from because I deleted my barcode scanner as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found