Update error message for an unknown tag in standalone components
See original GitHub issueWhich @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
Currently the error for unknown element tags looks like follows:
src/app/app.component.ts:7:14 - error NG8001: 'admin-s' is not a known element:
1. If 'admin-s' is an Angular component, then verify that it is part of this module.
2. If 'admin-s' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
7 template: '<admin-s></admin-s>',
This error message needs to be updated for standalone components to:
- mention
@Component.imports
/ `@Component.schemas’ - not mention NgModule
Issue Analytics
- State:
- Created a year ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
NG8001: Unknown HTML element or component - Angular
Use the element name in the error to find the file(s) where the element is being used. Check that the name and selector...
Read more >Windows Update error codes by component - Microsoft Learn
Learn about reference information for Windows Update error codes, including automatic update errors, UI errors, and reporter errors.
Read more >Cannot update a component while rendering a different ...
My error message was: Warning: Cannot update a component ( ForwardRef(BaseNavigationContainer) ) while rendering a different component ...
Read more >Angular 13.3.10 Release - GitClear
fix(compiler-cli): update unknown tag error for aot standalone components (#45919) ... fix(core): produce proper error message for unknown props on ...
Read more >Field - VeeValidate
The Field component renders an HTML input tag if not specified otherwise. ... You may use v-model here or bind the selected attributes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dario-piotrowicz great, thanks a lot for submitting 2 PRs! 👍
I had a quick look at the JIT PR and I’m sorry that it turned out a bit more involved. I was thinking that we already have the necessary information somewhere close to the code that throws an error. The change in the PR makes sense, I’ll perform additional review asap and let you know if there is any feedback.
Thank you.
Go @dario-piotrowicz , go! I’ve updated the issue description (it was badly formatted, sorry about that).
The basic idea is to determine the type of a component (standalone or not) and adjust the error message based on this type (the standalone flag can be read from the component def).
LMK if you’ve got any questions.